474 ui.writenoi18n(b'Bundle2 capabilities:\n') |
476 ui.writenoi18n(b'Bundle2 capabilities:\n') |
475 for key, values in sorted(pycompat.iteritems(b2caps)): |
477 for key, values in sorted(pycompat.iteritems(b2caps)): |
476 ui.write(b' %s\n' % key) |
478 ui.write(b' %s\n' % key) |
477 for v in values: |
479 for v in values: |
478 ui.write(b' %s\n' % v) |
480 ui.write(b' %s\n' % v) |
|
481 |
|
482 |
|
483 @command(b'debugchangedfiles', [], b'REV') |
|
484 def debugchangedfiles(ui, repo, rev): |
|
485 """list the stored files changes for a revision""" |
|
486 ctx = scmutil.revsingle(repo, rev, None) |
|
487 sd = repo.changelog.sidedata(ctx.rev()) |
|
488 files_block = sd.get(sidedata.SD_FILES) |
|
489 if files_block is not None: |
|
490 files = metadata.decode_files_sidedata(sd) |
|
491 for f in sorted(files.touched): |
|
492 if f in files.added: |
|
493 action = b"added" |
|
494 elif f in files.removed: |
|
495 action = b"removed" |
|
496 elif f in files.merged: |
|
497 action = b"merged" |
|
498 elif f in files.salvaged: |
|
499 action = b"salvaged" |
|
500 else: |
|
501 action = b"touched" |
|
502 |
|
503 copy_parent = b"" |
|
504 copy_source = b"" |
|
505 if f in files.copied_from_p1: |
|
506 copy_parent = b"p1" |
|
507 copy_source = files.copied_from_p1[f] |
|
508 elif f in files.copied_from_p2: |
|
509 copy_parent = b"p2" |
|
510 copy_source = files.copied_from_p2[f] |
|
511 |
|
512 data = (action, copy_parent, f, copy_source) |
|
513 template = b"%-8s %2s: %s, %s;\n" |
|
514 ui.write(template % data) |
479 |
515 |
480 |
516 |
481 @command(b'debugcheckstate', [], b'') |
517 @command(b'debugcheckstate', [], b'') |
482 def debugcheckstate(ui, repo): |
518 def debugcheckstate(ui, repo): |
483 """validate the correctness of the current dirstate""" |
519 """validate the correctness of the current dirstate""" |