diff hgext/convert/convcmd.py @ 25748:baea47cafe75

convert: add support for specifying multiple revs Previously convert could only take one '--rev'. This change allows the user to specify multiple --rev entries. For instance, this could allow converting multiple branches (but not all branches) at once from git. In this first patch, we disable support for this for all sources. Future patches will enable it for select sources (like git).
author Durham Goode <durham@fb.com>
date Wed, 08 Jul 2015 10:27:43 -0700
parents 86fe3c404c1e
children 584044e5ad57
line wrap: on
line diff
--- a/hgext/convert/convcmd.py	Mon Jul 06 01:38:37 2015 +0800
+++ b/hgext/convert/convcmd.py	Wed Jul 08 10:27:43 2015 -0700
@@ -46,14 +46,14 @@
     ('svn', svn_sink),
     ]
 
-def convertsource(ui, path, type, rev):
+def convertsource(ui, path, type, revs):
     exceptions = []
     if type and type not in [s[0] for s in source_converters]:
         raise util.Abort(_('%s: invalid source repository type') % type)
     for name, source, sortmode in source_converters:
         try:
             if not type or name == type:
-                return source(ui, path, rev), sortmode
+                return source(ui, path, revs), sortmode
         except (NoRepo, MissingTool) as inst:
             exceptions.append(inst)
     if not ui.quiet: