Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 23896:becfecaf9087
changegroup.writebundle: HG2Y support
This diff adds support to writebundle to generate a bundle2 wrapper; upcoming
diffs will add an option to write a v2 changegroup part instead of v1 in these
bundles.
author | Eric Sumner <ericsumner@fb.com> |
---|---|
date | Thu, 15 Jan 2015 15:39:16 -0800 |
parents | cda18ded2c48 |
children | fafd9a1284cf |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jan 15 14:39:41 2015 -0800 +++ b/mercurial/commands.py Thu Jan 15 15:39:16 2015 -0800 @@ -1181,7 +1181,10 @@ revs = scmutil.revrange(repo, opts['rev']) bundletype = opts.get('type', 'bzip2').lower() - btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'} + btypes = {'none': 'HG10UN', + 'bzip2': 'HG10BZ', + 'gzip': 'HG10GZ', + 'bundle2': 'HG2Y'} bundletype = btypes.get(bundletype) if bundletype not in changegroup.bundletypes: raise util.Abort(_('unknown bundle type specified with --type')) @@ -2161,7 +2164,10 @@ bundle = repo.getbundle('debug', **args) bundletype = opts.get('type', 'bzip2').lower() - btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'} + btypes = {'none': 'HG10UN', + 'bzip2': 'HG10BZ', + 'gzip': 'HG10GZ', + 'bundle2': 'HG2Y'} bundletype = btypes.get(bundletype) if bundletype not in changegroup.bundletypes: raise util.Abort(_('unknown bundle type specified with --type'))