##// END OF EJS Templates
convert: pass the order of the revmapfile to the converter_source...
Alexis S. L. Carvalho -
r5373:6aba1835 default
parent child Browse files
Show More
@@ -53,11 +53,14 b' class converter(object):'
53 self.authorfile = None
53 self.authorfile = None
54 self.mapfile = filemapper
54 self.mapfile = filemapper
55
55
56 self.maporder = []
56 self.map = {}
57 self.map = {}
57 try:
58 try:
58 origrevmapfile = open(self.revmapfile, 'r')
59 origrevmapfile = open(self.revmapfile, 'r')
59 for l in origrevmapfile:
60 for l in origrevmapfile:
60 sv, dv = l[:-1].split()
61 sv, dv = l[:-1].split()
62 if sv not in self.map:
63 self.maporder.append(sv)
61 self.map[sv] = dv
64 self.map[sv] = dv
62 origrevmapfile.close()
65 origrevmapfile.close()
63 except IOError:
66 except IOError:
@@ -238,7 +241,7 b' class converter(object):'
238 try:
241 try:
239 self.source.before()
242 self.source.before()
240 self.dest.before()
243 self.dest.before()
241 self.source.setrevmap(self.map)
244 self.source.setrevmap(self.map, self.maporder)
242 self.ui.status("scanning source...\n")
245 self.ui.status("scanning source...\n")
243 heads = self.source.getheads()
246 heads = self.source.getheads()
244 parents = self.walktree(heads)
247 parents = self.walktree(heads)
@@ -44,8 +44,11 b' class converter_source(object):'
44 def after(self):
44 def after(self):
45 pass
45 pass
46
46
47 def setrevmap(self, revmap):
47 def setrevmap(self, revmap, order):
48 """set the map of already-converted revisions"""
48 """set the map of already-converted revisions
49
50 order is a list with the keys from revmap in the order they
51 appear in the revision map file."""
49 pass
52 pass
50
53
51 def getheads(self):
54 def getheads(self):
@@ -147,7 +147,7 b' class convert_svn(converter_source):'
147
147
148 self.head = self.revid(self.last_changed)
148 self.head = self.revid(self.last_changed)
149
149
150 def setrevmap(self, revmap):
150 def setrevmap(self, revmap, order):
151 lastrevs = {}
151 lastrevs = {}
152 for revid in revmap.keys():
152 for revid in revmap.keys():
153 uuid, module, revnum = self.revsplit(revid)
153 uuid, module, revnum = self.revsplit(revid)
General Comments 0
You need to be logged in to leave comments. Login now