Mercurial > hg
comparison hgext/convert/convcmd.py @ 28900:b65966f50058
convert: keep converted hg parents that are outside convert.hg.revs (BC)
Before, when converting revisions without also including their already
converted parents in convert.hg.revs, the parents would no longer be parents.
That seems unfortunate and we dare to assume that nobody ever wants that.
Instead, preserve parents that are outside the current convert range but
already have been converted.
The parents returned in getcommit() are unconditionally converted, so we
introduce a separate optparents with optional parents.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 13 Apr 2016 00:16:21 +0200 |
parents | 80bd110dbf5e |
children | a0939666b836 |
comparison
equal
deleted
inserted
replaced
28899:8c94594adbef | 28900:b65966f50058 |
---|---|
470 self.ui.status(_('spliced in %s as parents of %s\n') % | 470 self.ui.status(_('spliced in %s as parents of %s\n') % |
471 (_(' and ').join(parents), rev)) | 471 (_(' and ').join(parents), rev)) |
472 parents = [self.map.get(p, p) for p in parents] | 472 parents = [self.map.get(p, p) for p in parents] |
473 except KeyError: | 473 except KeyError: |
474 parents = [b[0] for b in pbranches] | 474 parents = [b[0] for b in pbranches] |
475 parents.extend(self.map[x] | |
476 for x in commit.optparents | |
477 if x in self.map) | |
475 if len(pbranches) != 2: | 478 if len(pbranches) != 2: |
476 cleanp2 = set() | 479 cleanp2 = set() |
477 if len(parents) < 3: | 480 if len(parents) < 3: |
478 source = progresssource(self.ui, self.source, len(files)) | 481 source = progresssource(self.ui, self.source, len(files)) |
479 else: | 482 else: |