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

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 10:54 p.m.
Message ID <differential-rev-PHID-DREV-bri2ylcghhykn7z65orc-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30305/
State Superseded
Headers show

Comments

phabricator - April 4, 2018, 10:54 p.m.
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




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

Patch

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: