Mercurial > public > mercurial-scm > hg-stable
diff hgext/convert/subversion.py @ 5382:d7d395fb7cd5
convert_svn: add --filemap support
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 04 Oct 2007 23:21:37 -0300 |
parents | 6aba1835a7b3 |
children | 1d53a75ea0fc |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Thu Oct 04 23:21:37 2007 -0300 +++ b/hgext/convert/subversion.py Thu Oct 04 23:21:37 2007 -0300 @@ -146,6 +146,7 @@ self.last_changed = self.latest(self.module, latest) self.head = self.revid(self.last_changed) + self._changescache = None def setrevmap(self, revmap, order): lastrevs = {} @@ -206,6 +207,9 @@ return self.modecache[(file, rev)] def getchanges(self, rev): + if self._changescache and self._changescache[0] == rev: + return self._changescache[1] + self._changescache = None self.modecache = {} (paths, parents) = self.paths[rev] files, copies = self.expandpaths(rev, paths, parents) @@ -216,6 +220,11 @@ del self.paths[rev] return (files, copies) + def getchangedfiles(self, rev, i): + changes = self.getchanges(rev) + self._changescache = (rev, changes) + return [f[0] for f in changes[0]] + def getcommit(self, rev): if rev not in self.commits: uuid, module, revnum = self.revsplit(rev)