##// END OF EJS Templates
Revert convert-repo changes
Matt Mackall -
r1715:40346aa6 default
parent child Browse files
Show More
@@ -21,7 +21,7 b''
21 21 # interrupted and can be run repeatedly to copy new commits.
22 22
23 23 import sys, os, zlib, sha, time
24 from mercurial import hg, ui, util, commands
24 from mercurial import hg, ui, util
25 25
26 26 class convert_git:
27 27 def __init__(self, path):
@@ -113,7 +113,7 b' class convert_mercurial:'
113 113 except:
114 114 pass
115 115
116 def putcommit(self, files, parents, author, date, text):
116 def putcommit(self, files, parents, author, dest, text):
117 117 seen = {}
118 118 pl = []
119 119 for p in parents:
@@ -129,13 +129,8 b' class convert_mercurial:'
129 129 while parents:
130 130 p1 = p2
131 131 p2 = parents.pop(0)
132 self.repo.dirstate.setparents(hg.bin(p1), hg.bin(p2))
133 if len(files) > 0:
134 olddir = os.getcwd()
135 os.chdir(self.path)
136 commands.addremove(self.repo.ui, self.repo, *files)
137 os.chdir(olddir)
138 self.repo.commit(files, text, author, date)
132 self.repo.rawcommit(files, text, author, dest,
133 hg.bin(p1), hg.bin(p2))
139 134 text = "(octopus merge fixup)\n"
140 135 p2 = hg.hex(self.repo.changelog.tip())
141 136
@@ -265,6 +260,7 b' class convert:'
265 260 t = self.toposort(parents)
266 261 t = [n for n in t if n not in self.map]
267 262 num = len(t)
263 c = None
268 264
269 265 for c in t:
270 266 num -= 1
@@ -279,7 +275,7 b' class convert:'
279 275 if v in self.map:
280 276 ctags[k] = self.map[v]
281 277
282 if ctags:
278 if c and ctags:
283 279 nrev = self.dest.puttags(ctags)
284 280 # write another hash correspondence to override the previous
285 281 # one so we don't end up with extra tag heads
General Comments 0
You need to be logged in to leave comments. Login now