diff mercurial/commands.py @ 19201:309c439cdbaa

bundle-ng: add bundlecaps argument to getbundle() command
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 09 Feb 2013 23:42:03 +0100
parents 05390cfe678a
children 4b9e5b71dfa9
line wrap: on
line diff
--- a/mercurial/commands.py	Fri May 10 21:03:01 2013 +0200
+++ b/mercurial/commands.py	Sat Feb 09 23:42:03 2013 +0100
@@ -1096,13 +1096,16 @@
         base = ['null']
     else:
         base = scmutil.revrange(repo, opts.get('base'))
+    # TODO: get desired bundlecaps from command line.
+    bundlecaps = None
     if base:
         if dest:
             raise util.Abort(_("--base is incompatible with specifying "
                                "a destination"))
         common = [repo.lookup(rev) for rev in base]
         heads = revs and map(repo.lookup, revs) or revs
-        cg = repo.getbundle('bundle', heads=heads, common=common)
+        cg = repo.getbundle('bundle', heads=heads, common=common,
+                            bundlecaps=bundlecaps)
         outgoing = None
     else:
         dest = ui.expandpath(dest or 'default-push', dest or 'default')
@@ -1114,7 +1117,7 @@
                                                 onlyheads=heads,
                                                 force=opts.get('force'),
                                                 portable=True)
-        cg = repo.getlocalbundle('bundle', outgoing)
+        cg = repo.getlocalbundle('bundle', outgoing, bundlecaps)
     if not cg:
         scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded)
         return 1
@@ -1913,6 +1916,8 @@
         args['common'] = [bin(s) for s in common]
     if head:
         args['heads'] = [bin(s) for s in head]
+    # TODO: get desired bundlecaps from command line.
+    args['bundlecaps'] = None
     bundle = repo.getbundle('debug', **args)
 
     bundletype = opts.get('type', 'bzip2').lower()