# HG changeset patch # User David Soria Parra # Date 1481746043 28800 # Node ID b654112a011940c4cd611e79d62480bd34b284b2 # Parent db9e883566e8e43e2fb4507c9ba6d0742713d8f6 convert: return commit objects for revisions in the revmap Source revision data that exists in the revmap are ignored when pulling data from Perforce as we consider them already imported. In case where the `convertcmd.convert` algorithm requests a commit object for such a revision we are creating it. This is usually the case for parent of the first imported revision. diff -r db9e883566e8 -r b654112a0119 hgext/convert/p4.py --- a/hgext/convert/p4.py Tue Dec 13 21:49:58 2016 -0800 +++ b/hgext/convert/p4.py Wed Dec 14 12:07:23 2016 -0800 @@ -321,7 +321,13 @@ return marshal.load(stdout) def getcommit(self, rev): - return self.changeset[rev] + if rev in self.changeset: + return self.changeset[rev] + elif rev in self.revmap: + d = self._fetch_revision(rev) + return self._construct_commit(d, parents=None) + raise error.Abort( + _("cannot find %s in the revmap or parsed changesets") % rev) def gettags(self): return {}