change: pass verbose to print_atom()

laumann
Jul 17, 2023, 12:10 PM
RRYWNHFE3EIRQYBGMSZRLDGKWHVMDAO42QNKFQ2KVYPDC4IHANTAC

Dependencies

  • [2] 5D2IYPL7 change: introduce changestore, print deleted lines
  • [3] TGT4VSME change: decode FILE_ADD
  • [4] WH7UFRAZ change: close change files after load
  • [5] EHVLRMEF change: add vertexeq, fix deleted lines duplication
  • [6] YDQLW2ZO change: rework printing of patches - print Edit and Newvertex types
  • [7] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [8] JVU3TTT5 all: switch away from typedefing anonymous structs
  • [9] 55IIUFZG change: remove debugging line
  • [10] WFA5BBRF Fix warnings
  • [11] LPGHALLK change: adjust printing of file adds
  • [12] XRGUHSC4 change: fix some formatting issues
  • [13] XTVLIC24 change: refactor to print_change()
  • [14] 7WA2F6RS change: decode resurrectzombies, addroot, delroot
  • [15] 33ZXTRXR change: decode and print file deletions

Change contents

  • edit in change.c at line 638
    [2.3897]
    [3.570]
    }
    void
    printedgemap(struct edgemap *m)
    {
    printf("edgemap {\n edges: [\n");
    for (size_t i = 0; i < m->edges.len; i++) {
    struct edge *e = &m->edges.entries[i];
    printf(" edge { previous = %u, flag = ", e->previous);
    print_edgeflags(e->flag);
    printf(", from = position { change = ");
    hashprint(&e->from.change);
    printf(", pos = %lu }", e->from.pos);
    printf(", to = vertex { change = ");
    hashprint(&e->to.change);
    printf(", start = %lu, end = %lu }, introducedby = ",
    e->to.start, e->to.end);
    hashprint(&e->introducedby);
    printf(" }\n");
    }
    printf(" ]\n}\n");
  • replacement in change.c at line 667
    [3.348][2.3898:3973]()
    print_atom(struct changestore *changes, struct atom *a, uint8_t *contents)
    [3.348]
    [3.387]
    print_atom(
    struct changestore *changes, struct atom *a, uint8_t *contents,
    int verbose
    )
  • replacement in change.c at line 686
    [3.635][2.4150:4217]()
    /* print_positionlist(&v->downcontext); */
    /* printf("\n"); */
    [3.635]
    [3.690]
    print_positionlist(&v->downcontext);
    printf("\n");
  • edit in change.c at line 694
    [3.935][2.4281:4307]()
    /* edgemap debugging */
  • replacement in change.c at line 695
    [2.4308][2.4308:4696]()
    /* printf("edgemap {\n edges: [\n"); */
    /* for (i = 0; i < m->edges.len; i++) { */
    /* struct edge *e = &m->edges.entries[i]; */
    /* printf(" edge { previous = %u, flag = ", */
    /* e->previous); */
    /* print_edgeflags(e->flag); */
    /* printf(", from = position { change = "); */
    /* hashprint(&e->from.change); */
    /* printf(", pos = %lu }", e->from.pos); */
    [2.4308]
    [2.4696]
    if (verbose)
    printedgemap(m);
  • edit in change.c at line 698
    [2.4697][2.4697:4983]()
    /* printf(", to = vertex { change = "); */
    /* hashprint(&e->to.change); */
    /* printf(", start = %lu, end = %lu }, introducedby = ", */
    /* e->to.start, e->to.end); */
    /* hashprint(&e->introducedby); */
    /* printf(" }\n"); */
    /* } */
    /* printf(" ]\n}\n"); */
  • replacement in change.c at line 726
    [2.5135][2.5135:5206]()
    struct changestore *changes, struct hashed *hashed, uint8_t *contents
    [2.5135]
    [2.5206]
    struct changestore *changes, struct hashed *hashed, uint8_t *contents,
    int verbose
  • replacement in change.c at line 771
    [3.1554][2.5264:5301]()
    print_atom(changes, c, contents);
    [3.1554]
    [3.1582]
    print_atom(changes, c, contents, verbose);
  • replacement in change.c at line 784
    [2.5303][2.5303:5340]()
    print_atom(changes, c, contents);
    [2.5303]
    [2.5340]
    print_atom(changes, c, contents, verbose);
  • replacement in change.c at line 786
    [2.5341][2.5341:5388]()
    print_atom(changes, replacement, contents);
    [2.5341]
    [3.1779]
    print_atom(changes, replacement, contents, verbose);
  • replacement in change.c at line 811
    [3.551][2.5389:5437]()
    print_atom(changes, &f->contents, contents);
    [3.551]
    [3.552]
    print_atom(changes, &f->contents, contents, verbose);
  • replacement in change.c at line 885
    [3.1206][2.5438:5482]()
    print_atom(changes, &r->name, contents);
    [3.1206]
    [3.1241]
    print_atom(changes, &r->name, contents, verbose);
  • replacement in change.c at line 887
    [3.1263][2.5483:5528]()
    print_atom(changes, &r->inode, contents);
    [3.1263]
    [3.1299]
    print_atom(changes, &r->inode, contents, verbose);
  • edit in change.c at line 1032
    [2.7590][3.1246:1260](),[3.1246][3.1246:1260](),[3.1260][2.7591:7647]()
    if (verbose)
    dump_buf("contents", c->contents, off->contents_len);
  • replacement in change.c at line 1100
    [2.9156][2.9156:9226]()
    print_change(&changestore, &ch->change.hashed, ch->change.contents);
    [2.9130]
    [2.9226]
    print_change(
    &changestore, &ch->change.hashed, ch->change.contents, verbose
    );