[PATCH 1 of 4 v2] convert: remove unused and incorrect default handling for revmapfile

Mads Kiilerich mads at kiilerich.com
Thu Oct 10 13:46:14 CDT 2013


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1374236411 -7200
#      Fri Jul 19 14:20:11 2013 +0200
# Node ID b8151cd615f0e6407c89cb1cd4454cef3a9802e4
# Parent  e828975722c8ff632f08cbeb84ec184da2952823
convert: remove unused and incorrect default handling for revmapfile

destc is not a string and can thus not be os.path.join'ed. Convert would crash
if we ended up there ... but we wouldn't because both the sinks (hg and
subversion) sinks implement .revmapfile and "never" throws exceptions.

diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -516,10 +516,7 @@
         destc.setfilemapmode(True)
 
     if not revmapfile:
-        try:
-            revmapfile = destc.revmapfile()
-        except Exception:
-            revmapfile = os.path.join(destc, "map")
+        revmapfile = destc.revmapfile()
 
     c = converter(ui, srcc, destc, revmapfile, opts)
     c.convert(sortmode)


More information about the Mercurial-devel mailing list