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