Mercurial > hg
diff hgext/convert/convcmd.py @ 35176:671aba341d90
convert: save an indicator of the repo type for sources and sinks
This seems like basic info to have, and will be used shortly when deciding
whether or not to wrap the class for lfs conversions.
The other option is to just add a function to each class. But this seems better
in that the strings aren't duplicated, and the constructor for most of these
will run even if the VCS isn't installed, so it's easier to catch errors.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 22 Nov 2017 20:49:01 -0500 |
parents | ee10eb665036 |
children | 9700cb9df140 |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Wed Nov 15 23:43:15 2017 -0500 +++ b/hgext/convert/convcmd.py Wed Nov 22 20:49:01 2017 -0500 @@ -114,7 +114,7 @@ for name, source, sortmode in source_converters: try: if not type or name == type: - return source(ui, path, revs), sortmode + return source(ui, name, path, revs), sortmode except (NoRepo, MissingTool) as inst: exceptions.append(inst) if not ui.quiet: @@ -128,7 +128,7 @@ for name, sink in sink_converters: try: if not type or name == type: - return sink(ui, path) + return sink(ui, name, path) except NoRepo as inst: ui.note(_("convert: %s\n") % inst) except MissingTool as inst: