# HG changeset patch # User Patrick Mezard # Date 2009-04-26 09:35:53 # Node ID 78658990c7254a08c1339d1e50bed48b6b666de2 # Parent adce97d28389a82ea455f32bc036e0b67fe0d406 convert/bzr: make it work with filemaps (issue1631) The bzr converter maintains a child -> parents mapping and drop entries whenever a child is read. It does not work with filemaps, getchangedfiles() may be called more than once when filtered files belong to merge revisions. getchanges() still works that way but it is not clear whether a similar issue can arise when interacting with merges. diff --git a/hgext/convert/bzr.py b/hgext/convert/bzr.py --- a/hgext/convert/bzr.py +++ b/hgext/convert/bzr.py @@ -123,9 +123,8 @@ class bzr_source(converter_source): def getchangedfiles(self, rev, i): self._modecache = {} curtree = self.sourcerepo.revision_tree(rev) - parentids = self._parentids.pop(rev) if i is not None: - parentid = parentids[i] + parentid = self._parentids[rev][i] else: # no parent id, get the empty revision parentid = revision.NULL_REVISION diff --git a/tests/test-convert-bzr b/tests/test-convert-bzr --- a/tests/test-convert-bzr +++ b/tests/test-convert-bzr @@ -27,6 +27,12 @@ hg manifest -R source-hg -r tip echo "% test --rev option" hg convert -r 1 source source-1-hg glog -R source-1-hg +echo "% test with filemap" +cat > filemap <