Mercurial > hg > mercurial-crew-with-dirclash
diff hgext/convert/__init__.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 | c7623d2b2a66 |
children | 39b6eaee6fd7 |
line wrap: on
line diff
--- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -193,7 +193,8 @@ class convert(object): do_copies = hasattr(self.dest, 'copyfile') filenames = [] - for f, v in self.source.getchanges(rev): + files, copies = self.source.getchanges(rev) + for f, v in files: newf = self.mapfile(f) if not newf: continue @@ -206,8 +207,8 @@ class convert(object): e = self.source.getmode(f, v) self.dest.putfile(newf, e, data) if do_copies: - if f in commit.copies: - copyf = self.mapfile(commit.copies[f]) + if f in copies: + copyf = self.mapfile(copies[f]) if copyf: # Merely marks that a copy happened. self.dest.copyfile(copyf, newf)