Show More
@@ -1978,6 +1978,13 b' def debugcreatestreamclonebundle(ui, rep' | |||||
1978 |
|
1978 | |||
1979 | ui.write(_('bundle requirements: %s\n') % ', '.join(sorted(requirements))) |
|
1979 | ui.write(_('bundle requirements: %s\n') % ', '.join(sorted(requirements))) | |
1980 |
|
1980 | |||
|
1981 | @command('debugapplystreamclonebundle', [], 'FILE') | |||
|
1982 | def debugapplystreamclonebundle(ui, repo, fname): | |||
|
1983 | """apply a stream clone bundle file""" | |||
|
1984 | f = hg.openpath(ui, fname) | |||
|
1985 | gen = exchange.readbundle(ui, f, fname) | |||
|
1986 | gen.apply(repo) | |||
|
1987 | ||||
1981 | @command('debugcheckstate', [], '') |
|
1988 | @command('debugcheckstate', [], '') | |
1982 | def debugcheckstate(ui, repo): |
|
1989 | def debugcheckstate(ui, repo): | |
1983 | """validate the correctness of the current dirstate""" |
|
1990 | """validate the correctness of the current dirstate""" | |
@@ -6532,6 +6539,11 b' def unbundle(ui, repo, fname1, *fnames, ' | |||||
6532 | changes = [r.get('return', 0) |
|
6539 | changes = [r.get('return', 0) | |
6533 | for r in op.records['changegroup']] |
|
6540 | for r in op.records['changegroup']] | |
6534 | modheads = changegroup.combineresults(changes) |
|
6541 | modheads = changegroup.combineresults(changes) | |
|
6542 | elif isinstance(gen, streamclone.streamcloneapplier): | |||
|
6543 | raise error.Abort( | |||
|
6544 | _('packed bundles cannot be applied with ' | |||
|
6545 | '"hg unbundle"'), | |||
|
6546 | hint=_('use "hg debugapplystreamclonebundle"')) | |||
6535 | else: |
|
6547 | else: | |
6536 | modheads = gen.apply(repo, 'unbundle', 'bundle:' + fname) |
|
6548 | modheads = gen.apply(repo, 'unbundle', 'bundle:' + fname) | |
6537 | finally: |
|
6549 | finally: |
@@ -288,6 +288,26 b' generaldelta requirement is listed in st' | |||||
288 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da| |
|
288 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da| | |
289 | 0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....| |
|
289 | 0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....| | |
290 |
|
290 | |||
|
291 | Unpacking packed1 bundles with "hg unbundle" isn't allowed | |||
|
292 | ||||
|
293 | $ hg init packed | |||
|
294 | $ hg -R packed unbundle packed.hg | |||
|
295 | abort: packed bundles cannot be applied with "hg unbundle" | |||
|
296 | (use "hg debugapplystreamclonebundle") | |||
|
297 | [255] | |||
|
298 | ||||
|
299 | packed1 can be consumed from debug command | |||
|
300 | ||||
|
301 | $ hg -R packed debugapplystreamclonebundle packed.hg | |||
|
302 | 6 files to transfer, 2.55 KB of data | |||
|
303 | transferred 2.55 KB in *.* seconds (*) (glob) | |||
|
304 | ||||
|
305 | Does not work on non-empty repo | |||
|
306 | ||||
|
307 | $ hg -R packed debugapplystreamclonebundle packed.hg | |||
|
308 | abort: cannot apply stream clone bundle on non-empty repo | |||
|
309 | [255] | |||
|
310 | ||||
291 | Create partial clones |
|
311 | Create partial clones | |
292 |
|
312 | |||
293 | $ rm -r empty |
|
313 | $ rm -r empty |
@@ -69,6 +69,7 b' Do not show debug commands if there are ' | |||||
69 | Show debug commands if there are no other candidates |
|
69 | Show debug commands if there are no other candidates | |
70 | $ hg debugcomplete debug |
|
70 | $ hg debugcomplete debug | |
71 | debugancestor |
|
71 | debugancestor | |
|
72 | debugapplystreamclonebundle | |||
72 | debugbuilddag |
|
73 | debugbuilddag | |
73 | debugbundle |
|
74 | debugbundle | |
74 | debugcheckstate |
|
75 | debugcheckstate | |
@@ -232,6 +233,7 b' Show all commands + options' | |||||
232 | config: untrusted, edit, local, global |
|
233 | config: untrusted, edit, local, global | |
233 | copy: after, force, include, exclude, dry-run |
|
234 | copy: after, force, include, exclude, dry-run | |
234 | debugancestor: |
|
235 | debugancestor: | |
|
236 | debugapplystreamclonebundle: | |||
235 | debugbuilddag: mergeable-file, overwritten-file, new-file |
|
237 | debugbuilddag: mergeable-file, overwritten-file, new-file | |
236 | debugbundle: all |
|
238 | debugbundle: all | |
237 | debugcheckstate: |
|
239 | debugcheckstate: |
@@ -781,6 +781,8 b' Test list of internal help commands' | |||||
781 |
|
781 | |||
782 | debugancestor |
|
782 | debugancestor | |
783 | find the ancestor revision of two revisions in a given index |
|
783 | find the ancestor revision of two revisions in a given index | |
|
784 | debugapplystreamclonebundle | |||
|
785 | apply a stream clone bundle file | |||
784 | debugbuilddag |
|
786 | debugbuilddag | |
785 | builds a repo with a given DAG from scratch in the current |
|
787 | builds a repo with a given DAG from scratch in the current | |
786 | empty repo |
|
788 | empty repo | |
@@ -1068,6 +1070,7 b' Test keyword search help' | |||||
1068 |
|
1070 | |||
1069 | bookmarks create a new bookmark or list existing bookmarks |
|
1071 | bookmarks create a new bookmark or list existing bookmarks | |
1070 | clone make a copy of an existing repository |
|
1072 | clone make a copy of an existing repository | |
|
1073 | debugapplystreamclonebundle apply a stream clone bundle file | |||
1071 | debugcreatestreamclonebundle create a stream clone bundle file |
|
1074 | debugcreatestreamclonebundle create a stream clone bundle file | |
1072 | paths show aliases for remote repositories |
|
1075 | paths show aliases for remote repositories | |
1073 | update update working directory (or switch revisions) |
|
1076 | update update working directory (or switch revisions) |
General Comments 0
You need to be logged in to leave comments.
Login now