# HG changeset patch # User Patrick Mezard # Date 1240738553 -7200 # 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 -r adce97d28389 -r 78658990c725 hgext/convert/bzr.py --- a/hgext/convert/bzr.py Fri Apr 24 10:34:11 2009 +0200 +++ b/hgext/convert/bzr.py Sun Apr 26 11:35:53 2009 +0200 @@ -123,9 +123,8 @@ 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 -r adce97d28389 -r 78658990c725 tests/test-convert-bzr --- a/tests/test-convert-bzr Fri Apr 24 10:34:11 2009 +0200 +++ b/tests/test-convert-bzr Sun Apr 26 11:35:53 2009 +0200 @@ -27,6 +27,12 @@ echo "% test --rev option" hg convert -r 1 source source-1-hg glog -R source-1-hg +echo "% test with filemap" +cat > filemap <