diff hgext/convert/hg.py @ 4873:28b23b9073a8

convert: record the source revision in the changelog
author Brendan Cully <brendan@kublai.com>
date Fri, 13 Jul 2007 08:28:57 -0700
parents b6a1f2c46c6c
children cdd33a048289 6fd953d5faea
line wrap: on
line diff
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -54,11 +54,11 @@ class convert_mercurial(converter_sink):
 
         text = commit.desc
         extra = {}
-        try:
-            extra["branch"] = commit.branch
-        except AttributeError:
-            pass
-
+        if commit.branch:
+            extra['branch'] = commit.branch
+        if commit.rev:
+            extra['convert_revision'] = commit.rev
+            
         while parents:
             p1 = p2
             p2 = parents.pop(0)