# HG changeset patch # User Gregory Szorc # Date 1471491474 25200 # Node ID 6da03049666716e90b303af1bf4f55bde24f6b64 # Parent a87e469201f961b29c998fe503fb14e18a842e44 debugcommands: move debug{create,apply}streambundleclone to the new module diff -r a87e469201f9 -r 6da030496667 mercurial/commands.py --- a/mercurial/commands.py Wed Aug 17 21:07:22 2016 -0700 +++ b/mercurial/commands.py Wed Aug 17 20:37:54 2016 -0700 @@ -1867,25 +1867,6 @@ with repo.wlock(False): return cmdutil.copy(ui, repo, pats, opts) -@command('debugcreatestreamclonebundle', [], 'FILE') -def debugcreatestreamclonebundle(ui, repo, fname): - """create a stream clone bundle file - - Stream bundles are special bundles that are essentially archives of - revlog files. They are commonly used for cloning very quickly. - """ - requirements, gen = streamclone.generatebundlev1(repo) - changegroup.writechunks(ui, gen, fname) - - ui.write(_('bundle requirements: %s\n') % ', '.join(sorted(requirements))) - -@command('debugapplystreamclonebundle', [], 'FILE') -def debugapplystreamclonebundle(ui, repo, fname): - """apply a stream clone bundle file""" - f = hg.openpath(ui, fname) - gen = exchange.readbundle(ui, f, fname) - gen.apply(repo) - @command('debugcheckstate', [], '') def debugcheckstate(ui, repo): """validate the correctness of the current dirstate""" diff -r a87e469201f9 -r 6da030496667 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Wed Aug 17 21:07:22 2016 -0700 +++ b/mercurial/debugcommands.py Wed Aug 17 20:37:54 2016 -0700 @@ -27,6 +27,7 @@ revlog, scmutil, simplemerge, + streamclone, ) release = lockmod.release @@ -273,3 +274,22 @@ version = part.params.get('version', '01') cg = changegroup.getunbundler(version, part, 'UN') _debugchangegroup(ui, cg, all=all, indent=4, **opts) + +@command('debugcreatestreamclonebundle', [], 'FILE') +def debugcreatestreamclonebundle(ui, repo, fname): + """create a stream clone bundle file + + Stream bundles are special bundles that are essentially archives of + revlog files. They are commonly used for cloning very quickly. + """ + requirements, gen = streamclone.generatebundlev1(repo) + changegroup.writechunks(ui, gen, fname) + + ui.write(_('bundle requirements: %s\n') % ', '.join(sorted(requirements))) + +@command('debugapplystreamclonebundle', [], 'FILE') +def debugapplystreamclonebundle(ui, repo, fname): + """apply a stream clone bundle file""" + f = hg.openpath(ui, fname) + gen = exchange.readbundle(ui, f, fname) + gen.apply(repo)