change: remove debugging lines

laumann
Nov 11, 2022, 9:29 PM
KEC3WLFNXGJHCEDFZYYXWMAGYGC56MTZSLITJ6GHEMYCWKGX4W3AC

Dependencies

  • [2] CJEOFJ27 change: minor output adjustment
  • [3] 55SITR55 change: decode replacements
  • [4] ZKAOPMCH change: Implement decoding of edits, atoms, positions, among others
  • [5] RIWSVVAS change: decompress the 'contents' with zstd_seekable
  • [6] QYRJIOYP change: separate decoding and printing of hashed struct
  • [7] OBKF6SII change: decompress the hashed section too
  • [8] WMFNGOYT change: reduce printed noise, rework some code
  • [9] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [10] XTKRT6OQ format the codebase
  • [11] FMYCPGKD change: extract hash list decoding into reused function
  • [12] JAGXXSR7 change: initial work on decoding hunks
  • [13] 2U7P5SFQ Change struct names "struct foo -> typedef struct Foo"

Change contents

  • edit in change.c at line 95
    [4.941][4.514:585]()
    printf("expecting to read %lu bytes (compressed)\n", compressed_len);
  • edit in change.c at line 113
    [4.1577][4.147:207]()
    /* dump_buf("compressed", compressed, compressed_read); */
  • edit in change.c at line 225
    [4.1809][4.1809:1942](),[4.1942][4.2691:2694](),[4.2757][4.2691:2694](),[4.2691][4.2691:2694]()
    if (ishash) {
    printf("V(Some(");
    hashprint(hash);
    printf(")[%lu:%lu])\n", v->start, v->end);
    } else {
    printf("V(None)\n");
    }
  • edit in change.c at line 246
    [4.2321][4.2321:2460]()
    printf("introduced_by: ");
    if (ishash) {
    printf("Some(");
    hashprint(hash);
    printf(")\n");
    } else {
    printf("None\n");
    }
  • edit in change.c at line 253
    [4.2611][4.2611:2678](),[4.2678][4.3053:3113](),[4.3053][4.3053:3113]()
    printf("previous = %u, flag = %u\n", edge->previous, edge->flag);
    /* TODO: It might be nice to be able to dump the flags? */
  • edit in change.c at line 255
    [4.2727][4.2727:2728]()
  • edit in change.c at line 256
    [4.2771][4.2771:2772]()
  • edit in change.c at line 280
    [4.3418][4.3418:3451]()
    printf("Decoding Newvertex\n");
  • replacement in change.c at line 291
    [4.3776][4.3776:3825]()
    change_decode_atom(Bincode *binstat, Atom *atom)
    [4.3776]
    [4.3825]
    change_decode_edgemap(Bincode *binstat, Edgemap *edgemap)
  • edit in change.c at line 294
    [4.3350]
    [4.3350]
    size_t len;
    edgemap->edges.len = len = bincode_getu64(binstat);
    edgemap->edges.entries = xmalloc(sizeof(Edge) * len);
    for (i = 0; i < len; i++) {
    change_decode_newedge(binstat, &edgemap->edges.entries[i]);
    }
    /* inode */
    change_decode_position(binstat, &edgemap->inode);
    }
  • edit in change.c at line 304
    [4.3351]
    [4.3351]
    static void
    change_decode_atom(Bincode *binstat, Atom *atom)
    {
  • replacement in change.c at line 315
    [4.3952][4.3952:4279](),[4.4279][4.3674:3678](),[4.3674][4.3674:3678](),[4.3678][4.4280:4351](),[4.4351][4.3678:3679](),[4.3678][4.3678:3679]()
    atom->edgemap.edges.len = bincode_getu64(binstat);
    atom->edgemap.edges.entries =
    xmalloc(sizeof(Edge) * atom->edgemap.edges.len);
    printf("EdgeMap (%lu elements)\n", atom->edgemap.edges.len);
    for (i = 0; i < atom->edgemap.edges.len; i++) {
    change_decode_newedge(
    binstat, &atom->edgemap.edges.entries[i]
    );
    }
    /* inode */
    change_decode_position(binstat, &atom->edgemap.inode);
    [4.3952]
    [4.3721]
    change_decode_edgemap(binstat, &atom->edgemap);
  • edit in change.c at line 367
    [4.5386][3.50:249](),[3.249][4.4304:4305](),[4.5485][4.4304:4305](),[4.4304][4.4304:4305]()
    printf("%d. Edit in %s:%d (%s)\n", i + 1,
    bhunk->edit.local.path, bhunk->edit.local.line,
    bhunk->edit.encoding == NULL ?
    "(nil)" :
    bhunk->edit.encoding);
  • edit in change.c at line 377
    [4.4442][3.514:758]()
    printf("%d. Replacement in %s:%d (%s)\n", i + 1,
    bhunk->replacement.local.path,
    bhunk->replacement.local.line,
    bhunk->replacement.encoding == NULL ?
    "(nil)" :
    bhunk->replacement.encoding);
  • edit in change.c at line 559
    [4.949][2.0:31](),[2.31][4.1046:1375](),[4.1046][4.1046:1375](),[4.1375][2.32:63](),[2.63][4.1472:1473](),[4.1472][4.1472:1473]()
    printf("----------------\n");
    printf("version = %lu\n", off.version);
    printf("hashed_len = %lu\n", off.hashed_len);
    printf("unhashed_off = %lu\n", off.unhashed_off);
    printf("unhashed_len = %lu\n", off.unhashed_len);
    printf("contents_off = %lu\n", off.contents_off);
    printf("contents_len = %lu\n", off.contents_len);
    printf("total = %lu\n", off.total);
    printf("----------------\n");