Patchwork [1,of,4] convert: remove unused and incorrect default handling for revmapfile

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 2, 2013, 5:56 p.m.
Message ID <33c6179248c5db3a7b4d.1380736603@mk-desktop>
Download mbox | patch
Permalink /patch/2708/
State Superseded
Commit 3828b3e09462132d205db72bffa4bc7922d3b96f
Headers show

Comments

Mads Kiilerich - Oct. 2, 2013, 5:56 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1374236411 -7200
#      Fri Jul 19 14:20:11 2013 +0200
# Node ID 33c6179248c5db3a7b4d978e6b98bc44d42f4dd4
# Parent  f7049d130969daafb79939ea10bdf4bb40846d2d
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.

Patch

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)