convert: use repo.lookup() for converting to nodeid
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 04 Apr 2018 09:03:17 -0700
changeset 37361 e45545f7895e
parent 37360 d0d55980ffa7
child 37362 c16b55edd408
convert: use repo.lookup() for converting to nodeid 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. Differential Revision: https://phab.mercurial-scm.org/D3089
hgext/convert/hg.py
--- a/hgext/convert/hg.py	Wed Apr 04 22:36:21 2018 -0700
+++ b/hgext/convert/hg.py	Wed Apr 04 09:03:17 2018 -0700
@@ -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: