Show More
@@ -311,6 +311,8 b' class mapfile(dict):' | |||||
311 | self._read() |
|
311 | self._read() | |
312 |
|
312 | |||
313 | def _read(self): |
|
313 | def _read(self): | |
|
314 | if self.path is None: | |||
|
315 | return | |||
314 | try: |
|
316 | try: | |
315 | fp = open(self.path, 'r') |
|
317 | fp = open(self.path, 'r') | |
316 | except IOError, err: |
|
318 | except IOError, err: |
@@ -74,6 +74,8 b' class converter(object):' | |||||
74 | self.readauthormap(opts.get('authors')) |
|
74 | self.readauthormap(opts.get('authors')) | |
75 | self.authorfile = self.dest.authorfile() |
|
75 | self.authorfile = self.dest.authorfile() | |
76 |
|
76 | |||
|
77 | self.splicemap = mapfile(ui, ui.config('convert', 'splicemap')) | |||
|
78 | ||||
77 | def walktree(self, heads): |
|
79 | def walktree(self, heads): | |
78 | '''Return a mapping that identifies the uncommitted parents of every |
|
80 | '''Return a mapping that identifies the uncommitted parents of every | |
79 | uncommitted changeset.''' |
|
81 | uncommitted changeset.''' | |
@@ -224,7 +226,12 b' class converter(object):' | |||||
224 | # Merely marks that a copy happened. |
|
226 | # Merely marks that a copy happened. | |
225 | self.dest.copyfile(copyf, f) |
|
227 | self.dest.copyfile(copyf, f) | |
226 |
|
228 | |||
227 | parents = [b[0] for b in pbranches] |
|
229 | try: | |
|
230 | parents = [self.splicemap[rev]] | |||
|
231 | self.ui.debug('spliced in %s as parents of %s\n' % | |||
|
232 | (parents, rev)) | |||
|
233 | except KeyError: | |||
|
234 | parents = [b[0] for b in pbranches] | |||
228 | newnode = self.dest.putcommit(filenames, parents, commit) |
|
235 | newnode = self.dest.putcommit(filenames, parents, commit) | |
229 | self.source.converted(rev, newnode) |
|
236 | self.source.converted(rev, newnode) | |
230 | self.map[rev] = newnode |
|
237 | self.map[rev] = newnode |
General Comments 0
You need to be logged in to leave comments.
Login now