[PATCH 4 of 5] All existing convert tests are fixed

Michael J. Pedersen m.pedersen at icelus.org
Wed May 13 13:28:53 CDT 2009


# HG changeset patch
# User Michael J. Pedersen <m.pedersen at icelus.org>
# Date 1242235765 14400
# Node ID 303eb1c0eb35cddbeb8b57c875c4985d17212ff7
# Parent  12488e7fabef49d07745264b489adf04303e63ce
All existing convert tests are fixed.

diff -r 12488e7fabef -r 303eb1c0eb35 hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py	Wed May 13 12:20:02 2009 -0500
+++ b/hgext/convert/convcmd.py	Wed May 13 13:29:25 2009 -0400
@@ -231,7 +231,9 @@
 
     def copy(self, rev):
         commit = self.commitcache[rev]
-        commit.branch = self.branchmap.get(commit.branch, commit.branch).replace(',', ' ').split()[0]
+        replbranch = self.branchmap.get(commit.branch, commit.branch)
+        if replbranch:
+            commit.branch = replbranch.replace(',', ' ').split()[0]
 
         changes = self.source.getchanges(rev)
         if isinstance(changes, basestring):


More information about the Mercurial-devel mailing list