comparison hgext/convert/bzr.py @ 8165:78658990c725

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.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 26 Apr 2009 11:35:53 +0200
parents adce97d28389
children 56719b1aa6f4 eb7be0e752d9
comparison
equal deleted inserted replaced
8148:adce97d28389 8165:78658990c725
121 return bytetags 121 return bytetags
122 122
123 def getchangedfiles(self, rev, i): 123 def getchangedfiles(self, rev, i):
124 self._modecache = {} 124 self._modecache = {}
125 curtree = self.sourcerepo.revision_tree(rev) 125 curtree = self.sourcerepo.revision_tree(rev)
126 parentids = self._parentids.pop(rev)
127 if i is not None: 126 if i is not None:
128 parentid = parentids[i] 127 parentid = self._parentids[rev][i]
129 else: 128 else:
130 # no parent id, get the empty revision 129 # no parent id, get the empty revision
131 parentid = revision.NULL_REVISION 130 parentid = revision.NULL_REVISION
132 131
133 prevtree = self.sourcerepo.revision_tree(parentid) 132 prevtree = self.sourcerepo.revision_tree(parentid)