##// END OF EJS Templates
convert: fix mercurial_sink.putcommit...
Alexis S. L. Carvalho -
r5195:33015dac default
parent child Browse files
Show More
@@ -219,7 +219,10 b' class convert(object):'
219 # Merely marks that a copy happened.
219 # Merely marks that a copy happened.
220 self.dest.copyfile(copyf, newf)
220 self.dest.copyfile(copyf, newf)
221
221
222 newnode = self.dest.putcommit(filenames, parents, commit)
222 if not filenames and self.mapfile.active():
223 newnode = parents[0]
224 else:
225 newnode = self.dest.putcommit(filenames, parents, commit)
223 self.mapentry(rev, newnode)
226 self.mapentry(rev, newnode)
224
227
225 def convert(self):
228 def convert(self):
@@ -352,6 +355,9 b' class filemapper(object):'
352 return newpre
355 return newpre
353 return name
356 return name
354
357
358 def active(self):
359 return bool(self.include or self.exclude or self.rename)
360
355 def _convert(ui, src, dest=None, revmapfile=None, **opts):
361 def _convert(ui, src, dest=None, revmapfile=None, **opts):
356 """Convert a foreign SCM repository to a Mercurial one.
362 """Convert a foreign SCM repository to a Mercurial one.
357
363
@@ -86,10 +86,7 b' class mercurial_sink(converter_sink):'
86 self.repo = hg.repository(self.ui, branchpath)
86 self.repo = hg.repository(self.ui, branchpath)
87
87
88 def putcommit(self, files, parents, commit):
88 def putcommit(self, files, parents, commit):
89 if not files:
89 seen = {}
90 return hex(self.repo.changelog.tip())
91
92 seen = {hex(nullid): 1}
93 pl = []
90 pl = []
94 for p in parents:
91 for p in parents:
95 if p not in seen:
92 if p not in seen:
General Comments 0
You need to be logged in to leave comments. Login now