diff hgext/convert/hg.py @ 5076:ef338e34a906

convert: look up copies in getchanges instead of getcommit svn: defer path expansion until getchanges to reduce latency, as well as memory usage when converting incrementally.
author Brendan Cully <brendan@kublai.com>
date Sun, 05 Aug 2007 12:03:27 -0700
parents a11e8a181bd5
children 2f9edf6bae95
line wrap: on
line diff
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -151,7 +151,7 @@ class mercurial_source(converter_source)
         m, a, r = self.repo.status(ctx.parents()[0].node(), ctx.node())[:3]
         changes = [(name, rev) for name in m + a + r]
         changes.sort()
-        return changes
+        return (changes, self.getcopies(ctx))
 
     def getcopies(self, ctx):
         added = self.repo.status(ctx.parents()[0].node(), ctx.node())[1]
@@ -168,7 +168,7 @@ class mercurial_source(converter_source)
         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(), copies=self.getcopies(ctx))
+                      branch=ctx.branch())
 
     def gettags(self):
         tags = [t for t in self.repo.tagslist() if t[0] != 'tip']