##// END OF EJS Templates
commands: support consuming stream clone bundles...
Gregory Szorc -
r26758:bde7ef23 default
parent child Browse files
Show More
@@ -1978,6 +1978,13 b' def debugcreatestreamclonebundle(ui, rep'
1978 1978
1979 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 1988 @command('debugcheckstate', [], '')
1982 1989 def debugcheckstate(ui, repo):
1983 1990 """validate the correctness of the current dirstate"""
@@ -6532,6 +6539,11 b' def unbundle(ui, repo, fname1, *fnames, '
6532 6539 changes = [r.get('return', 0)
6533 6540 for r in op.records['changegroup']]
6534 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 6547 else:
6536 6548 modheads = gen.apply(repo, 'unbundle', 'bundle:' + fname)
6537 6549 finally:
@@ -288,6 +288,26 b' generaldelta requirement is listed in st'
288 288 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
289 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 311 Create partial clones
292 312
293 313 $ rm -r empty
@@ -69,6 +69,7 b' Do not show debug commands if there are '
69 69 Show debug commands if there are no other candidates
70 70 $ hg debugcomplete debug
71 71 debugancestor
72 debugapplystreamclonebundle
72 73 debugbuilddag
73 74 debugbundle
74 75 debugcheckstate
@@ -232,6 +233,7 b' Show all commands + options'
232 233 config: untrusted, edit, local, global
233 234 copy: after, force, include, exclude, dry-run
234 235 debugancestor:
236 debugapplystreamclonebundle:
235 237 debugbuilddag: mergeable-file, overwritten-file, new-file
236 238 debugbundle: all
237 239 debugcheckstate:
@@ -781,6 +781,8 b' Test list of internal help commands'
781 781
782 782 debugancestor
783 783 find the ancestor revision of two revisions in a given index
784 debugapplystreamclonebundle
785 apply a stream clone bundle file
784 786 debugbuilddag
785 787 builds a repo with a given DAG from scratch in the current
786 788 empty repo
@@ -1068,6 +1070,7 b' Test keyword search help'
1068 1070
1069 1071 bookmarks create a new bookmark or list existing bookmarks
1070 1072 clone make a copy of an existing repository
1073 debugapplystreamclonebundle apply a stream clone bundle file
1071 1074 debugcreatestreamclonebundle create a stream clone bundle file
1072 1075 paths show aliases for remote repositories
1073 1076 update update working directory (or switch revisions)
General Comments 0
You need to be logged in to leave comments. Login now