hgext/convert/__init__.py
changeset 5173 6b4c332f241b
parent 5143 d4fa6bafc43a
child 5195 33015dac5df5
--- a/hgext/convert/__init__.py	Wed Aug 15 17:27:51 2007 +0200
+++ b/hgext/convert/__init__.py	Wed Aug 15 13:21:23 2007 -0700
@@ -194,6 +194,12 @@
         filenames = []
 
         files, copies = self.source.getchanges(rev)
+        parents = [self.map[r] for r in commit.parents]
+        if commit.parents:
+            pbranch = self.commitcache[commit.parents[0]].branch
+        else:
+            pbranch = None
+        self.dest.setbranch(commit.branch, pbranch, parents)
         for f, v in files:
             newf = self.mapfile(f)
             if not newf:
@@ -213,7 +219,6 @@
                             # Merely marks that a copy happened.
                             self.dest.copyfile(copyf, newf)
 
-        parents = [self.map[r] for r in commit.parents]
         newnode = self.dest.putcommit(filenames, parents, commit)
         self.mapentry(rev, newnode)