D3089: convert: use repo.lookup() for converting to nodeid

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Apr 4 22:54:00 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is a list of revs that come from the CLI (opts['rev']). Perhaps
  we should allow any revset, but I'll leave that for someone else to
  improve if they care.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3089

AFFECTED FILES
  hgext/convert/hg.py

CHANGE DETAILS

diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -481,7 +481,7 @@
             else:
                 self.keep = util.always
             if revs:
-                self._heads = [self.repo[r].node() for r in revs]
+                self._heads = [self.repo.lookup(r) for r in revs]
             else:
                 self._heads = self.repo.heads()
         else:



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list