Show More
@@ -219,7 +219,10 b' class convert(object):' | |||
|
219 | 219 | # Merely marks that a copy happened. |
|
220 | 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 | 226 | self.mapentry(rev, newnode) |
|
224 | 227 | |
|
225 | 228 | def convert(self): |
@@ -352,6 +355,9 b' class filemapper(object):' | |||
|
352 | 355 | return newpre |
|
353 | 356 | return name |
|
354 | 357 | |
|
358 | def active(self): | |
|
359 | return bool(self.include or self.exclude or self.rename) | |
|
360 | ||
|
355 | 361 | def _convert(ui, src, dest=None, revmapfile=None, **opts): |
|
356 | 362 | """Convert a foreign SCM repository to a Mercurial one. |
|
357 | 363 |
@@ -86,10 +86,7 b' class mercurial_sink(converter_sink):' | |||
|
86 | 86 | self.repo = hg.repository(self.ui, branchpath) |
|
87 | 87 | |
|
88 | 88 | def putcommit(self, files, parents, commit): |
|
89 | if not files: | |
|
90 | return hex(self.repo.changelog.tip()) | |
|
91 | ||
|
92 | seen = {hex(nullid): 1} | |
|
89 | seen = {} | |
|
93 | 90 | pl = [] |
|
94 | 91 | for p in parents: |
|
95 | 92 | if p not in seen: |
General Comments 0
You need to be logged in to leave comments.
Login now