Mercurial > public > mercurial-scm > hg
diff hgext/convert/hg.py @ 25570:7cc1d33f0ba6
convert: always track the hg source revision in the internal commit object
This will be needed in the next patch to determine if phases need to be
adjusted. The insertion of the source revision in 'extras{}' is still
controlled by the config property.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 14 Jun 2015 13:04:00 -0400 |
parents | daf9f7ee2a5c |
children | 1abfe639a70c |
line wrap: on
line diff
--- a/hgext/convert/hg.py Sat Jun 13 00:51:43 2015 -0700 +++ b/hgext/convert/hg.py Sun Jun 14 13:04:00 2015 -0400 @@ -243,7 +243,7 @@ if self.branchnames and commit.branch: extra['branch'] = commit.branch - if commit.rev: + if commit.rev and commit.saverev: extra['convert_revision'] = commit.rev while parents: @@ -473,15 +473,13 @@ def getcommit(self, rev): ctx = self.changectx(rev) parents = [p.hex() for p in self.parents(ctx)] - if self.saverev: - crev = rev - else: - crev = None + crev = rev + return commit(author=ctx.user(), date=util.datestr(ctx.date(), '%Y-%m-%d %H:%M:%S %1%2'), desc=ctx.description(), rev=crev, parents=parents, branch=ctx.branch(), extra=ctx.extra(), - sortkey=ctx.rev()) + sortkey=ctx.rev(), saverev=self.saverev) def gettags(self): # This will get written to .hgtags, filter non global tags out.