Show More
@@ -7730,7 +7730,7 b' def tip(ui, repo, **opts):' | |||
|
7730 | 7730 | _(b'[-u] FILE...'), |
|
7731 | 7731 | helpcategory=command.CATEGORY_IMPORT_EXPORT, |
|
7732 | 7732 | ) |
|
7733 | def unbundle(ui, repo, fname1, *fnames, **opts): | |
|
7733 | def unbundle(ui, repo, fname1, *fnames, _unbundle_source=b'unbundle', **opts): | |
|
7734 | 7734 | """apply one or more bundle files |
|
7735 | 7735 | |
|
7736 | 7736 | Apply one or more bundle files generated by :hg:`bundle`. |
@@ -7758,7 +7758,11 b' def unbundle(ui, repo, fname1, *fnames, ' | |||
|
7758 | 7758 | txnname = b'unbundle\n%s' % urlutil.hidepassword(url) |
|
7759 | 7759 | with repo.transaction(txnname) as tr: |
|
7760 | 7760 | op = bundle2.applybundle( |
|
7761 |
repo, |
|
|
7761 | repo, | |
|
7762 | gen, | |
|
7763 | tr, | |
|
7764 | source=_unbundle_source, # used by debug::unbundle | |
|
7765 | url=url, | |
|
7762 | 7766 | ) |
|
7763 | 7767 | except error.BundleUnknownFeatureError as exc: |
|
7764 | 7768 | raise error.Abort( |
@@ -4077,6 +4077,30 b' def debugupgraderepo(ui, repo, run=False' | |||
|
4077 | 4077 | |
|
4078 | 4078 | |
|
4079 | 4079 | @command( |
|
4080 | b'debug::unbundle', | |
|
4081 | [ | |
|
4082 | ( | |
|
4083 | b'u', | |
|
4084 | b'update', | |
|
4085 | None, | |
|
4086 | _(b'update to new branch head if changesets were unbundled'), | |
|
4087 | ) | |
|
4088 | ], | |
|
4089 | _(b'[-u] FILE...'), | |
|
4090 | helpcategory=command.CATEGORY_IMPORT_EXPORT, | |
|
4091 | ) | |
|
4092 | def debugunbundle(ui, repo, *args, **kwargs): | |
|
4093 | """same as `hg unbundle`, but pretent to come from a push | |
|
4094 | ||
|
4095 | This is useful to debug behavior and performance change in this case. | |
|
4096 | """ | |
|
4097 | from . import commands # avoid cycle | |
|
4098 | ||
|
4099 | unbundle = cmdutil.findcmd(b'unbundle', commands.table)[1][0] | |
|
4100 | return unbundle(ui, repo, *args, _unbundle_source=b'push', **kwargs) | |
|
4101 | ||
|
4102 | ||
|
4103 | @command( | |
|
4080 | 4104 | b'debugwalk', cmdutil.walkopts, _(b'[OPTION]... [FILE]...'), inferrepo=True |
|
4081 | 4105 | ) |
|
4082 | 4106 | def debugwalk(ui, repo, *pats, **opts): |
@@ -82,6 +82,7 b' Show debug commands if there are no othe' | |||
|
82 | 82 | debug-revlog-stats |
|
83 | 83 | debug::stable-tail-sort |
|
84 | 84 | debug::stable-tail-sort-leaps |
|
85 | debug::unbundle | |
|
85 | 86 | debugancestor |
|
86 | 87 | debugantivirusrunning |
|
87 | 88 | debugapplystreamclonebundle |
@@ -280,6 +281,7 b' Show all commands + options' | |||
|
280 | 281 | debug-revlog-stats: changelog, manifest, filelogs, template |
|
281 | 282 | debug::stable-tail-sort: template |
|
282 | 283 | debug::stable-tail-sort-leaps: template, specific |
|
284 | debug::unbundle: update | |
|
283 | 285 | debugancestor: |
|
284 | 286 | debugantivirusrunning: |
|
285 | 287 | debugapplystreamclonebundle: |
@@ -659,6 +659,19 b' Test cache warming command' | |||
|
659 | 659 | .hg/cache/branch2-immutable |
|
660 | 660 | .hg/cache/branch2-base |
|
661 | 661 | |
|
662 | Test debug::unbundle | |
|
663 | ||
|
664 | $ hg bundle --exact --rev tip foo.hg | |
|
665 | 1 changesets found | |
|
666 | $ hg debug::unbundle foo.hg | |
|
667 | adding changesets | |
|
668 | adding manifests | |
|
669 | adding file changes | |
|
670 | added 0 changesets with 0 changes to 1 files (no-pure !) | |
|
671 | 9 local changesets published (no-pure !) | |
|
672 | 3 local changesets published (pure !) | |
|
673 | (run 'hg update' to get a working copy) | |
|
674 | ||
|
662 | 675 | Test debugcolor |
|
663 | 676 | |
|
664 | 677 | #if no-windows |
@@ -1006,6 +1006,8 b' Test list of internal help commands' | |||
|
1006 | 1006 | debug::stable-tail-sort-leaps |
|
1007 | 1007 | display the leaps in the stable-tail sort of a node, one per |
|
1008 | 1008 | line |
|
1009 | debug::unbundle | |
|
1010 | same as 'hg unbundle', but pretent to come from a push | |
|
1009 | 1011 | debugancestor |
|
1010 | 1012 | find the ancestor revision of two revisions in a given index |
|
1011 | 1013 | debugantivirusrunning |
General Comments 0
You need to be logged in to leave comments.
Login now