On 12/7/16 9:51 PM, David Soria Parra wrote: > # HG changeset patch > # User David Soria Parra <davi...@fb.com> > # Date 1481143876 28800 > # Wed Dec 07 12:51:16 2016 -0800 > # Node ID 109de539306c5bc49d38d6f1c802c4a8d092b485 > # Parent be68e4436851b7e20f3b8cb34666418f5840dd66 > convert: Create commits from revmap list if needed This commit demonstrates the need to add some sort of comment to self.revmap = {} in constructor. Otherwise, it's very confusing IMO. > > diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py > --- a/hgext/convert/p4.py > +++ b/hgext/convert/p4.py > @@ -314,6 +314,12 @@ > return marshal.load(stdout) > > def getcommit(self, rev): > + if rev not in self.changeset and rev not in self.revmap: > + raise error.Abort( > + _("cannot find %s in the revmap or parsed changesets") % rev) > + if rev not in self.changeset: > + d = self._fetch_revision(rev) > + return self._construct_commit(d, parents=None) > return self.changeset[rev] > > def gettags(self): > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel