diff hgext/convert/hg.py @ 5439:d0c67b52ac01

convert: make contents of "extra" dict available from sources, for sinks. This breaks hash preservation for hg->hg conversion, as each converted change gets a convert_revision item added to its extra dict. Ugh.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 10 Oct 2007 15:30:00 -0700
parents 4d34f8b12a9e
children b4ae8535f834
line wrap: on
line diff
--- a/hgext/convert/hg.py	Wed Oct 10 15:30:00 2007 -0700
+++ b/hgext/convert/hg.py	Wed Oct 10 15:30:00 2007 -0700
@@ -108,7 +108,7 @@
         p2 = parents.pop(0)
 
         text = commit.desc
-        extra = {}
+        extra = commit.extra.copy()
         if self.branchnames and commit.branch:
             extra['branch'] = commit.branch
         if commit.rev:
@@ -230,7 +230,7 @@
         parents = [hex(p.node()) for p in ctx.parents() if p.node() != nullid]
         return commit(author=ctx.user(), date=util.datestr(ctx.date()),
                       desc=ctx.description(), parents=parents,
-                      branch=ctx.branch())
+                      branch=ctx.branch(), extra=ctx.extra())
 
     def gettags(self):
         tags = [t for t in self.repo.tagslist() if t[0] != 'tip']