diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py --- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -53,11 +53,14 @@ class converter(object): self.authorfile = None self.mapfile = filemapper + self.maporder = [] self.map = {} try: origrevmapfile = open(self.revmapfile, 'r') for l in origrevmapfile: sv, dv = l[:-1].split() + if sv not in self.map: + self.maporder.append(sv) self.map[sv] = dv origrevmapfile.close() except IOError: @@ -238,7 +241,7 @@ class converter(object): try: self.source.before() self.dest.before() - self.source.setrevmap(self.map) + self.source.setrevmap(self.map, self.maporder) self.ui.status("scanning source...\n") heads = self.source.getheads() parents = self.walktree(heads) diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -44,8 +44,11 @@ class converter_source(object): def after(self): pass - def setrevmap(self, revmap): - """set the map of already-converted revisions""" + def setrevmap(self, revmap, order): + """set the map of already-converted revisions + + order is a list with the keys from revmap in the order they + appear in the revision map file.""" pass def getheads(self): diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -147,7 +147,7 @@ class convert_svn(converter_source): self.head = self.revid(self.last_changed) - def setrevmap(self, revmap): + def setrevmap(self, revmap, order): lastrevs = {} for revid in revmap.keys(): uuid, module, revnum = self.revsplit(revid)