Show More
@@ -484,14 +484,31 b' def debugcapabilities(ui, path, **opts):' | |||||
484 | ui.write(b' %s\n' % v) |
|
484 | ui.write(b' %s\n' % v) | |
485 |
|
485 | |||
486 |
|
486 | |||
487 | @command(b'debugchangedfiles', [], b'REV') |
|
487 | @command( | |
488 |
|
|
488 | b'debugchangedfiles', | |
|
489 | [ | |||
|
490 | ( | |||
|
491 | b'', | |||
|
492 | b'compute', | |||
|
493 | False, | |||
|
494 | b"compute information instead of reading it from storage", | |||
|
495 | ), | |||
|
496 | ], | |||
|
497 | b'REV', | |||
|
498 | ) | |||
|
499 | def debugchangedfiles(ui, repo, rev, **opts): | |||
489 | """list the stored files changes for a revision""" |
|
500 | """list the stored files changes for a revision""" | |
490 | ctx = scmutil.revsingle(repo, rev, None) |
|
501 | ctx = scmutil.revsingle(repo, rev, None) | |
491 | sd = repo.changelog.sidedata(ctx.rev()) |
|
502 | files = None | |
492 | files_block = sd.get(sidedata.SD_FILES) |
|
503 | ||
493 | if files_block is not None: |
|
504 | if opts['compute']: | |
494 |
files = metadata. |
|
505 | files = metadata.compute_all_files_changes(ctx) | |
|
506 | else: | |||
|
507 | sd = repo.changelog.sidedata(ctx.rev()) | |||
|
508 | files_block = sd.get(sidedata.SD_FILES) | |||
|
509 | if files_block is not None: | |||
|
510 | files = metadata.decode_files_sidedata(sd) | |||
|
511 | if files is not None: | |||
495 | for f in sorted(files.touched): |
|
512 | for f in sorted(files.touched): | |
496 | if f in files.added: |
|
513 | if f in files.added: | |
497 | action = b"added" |
|
514 | action = b"added" |
@@ -272,7 +272,7 b' Show all commands + options' | |||||
272 | debugbuilddag: mergeable-file, overwritten-file, new-file |
|
272 | debugbuilddag: mergeable-file, overwritten-file, new-file | |
273 | debugbundle: all, part-type, spec |
|
273 | debugbundle: all, part-type, spec | |
274 | debugcapabilities: |
|
274 | debugcapabilities: | |
275 | debugchangedfiles: |
|
275 | debugchangedfiles: compute | |
276 | debugcheckstate: |
|
276 | debugcheckstate: | |
277 | debugcolor: style |
|
277 | debugcolor: style | |
278 | debugcommands: |
|
278 | debugcommands: |
@@ -721,6 +721,11 b' We upgrade a repository that is not usin' | |||||
721 |
|
721 | |||
722 | #if no-compatibility no-filelog no-changeset |
|
722 | #if no-compatibility no-filelog no-changeset | |
723 |
|
723 | |||
|
724 | $ hg debugchangedfiles --compute 0 | |||
|
725 | added : a, ; | |||
|
726 | added : b, ; | |||
|
727 | added : h, ; | |||
|
728 | ||||
724 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do |
|
729 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | |
725 | > echo "##### revision $rev #####" |
|
730 | > echo "##### revision $rev #####" | |
726 | > hg debugsidedata -c -v -- $rev |
|
731 | > hg debugsidedata -c -v -- $rev |
General Comments 0
You need to be logged in to leave comments.
Login now