changeset 37311:2a8939e25d07

transplant: avoid repo.lookup() for converting revnum to nodeid Differential Revision: https://phab.mercurial-scm.org/D3051
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 01 Apr 2018 23:19:37 -0700
parents 5da299dabdc1
children e47bd4c71c5e
files hgext/transplant.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Sun Apr 01 23:10:25 2018 -0700
+++ b/hgext/transplant.py	Sun Apr 01 23:19:37 2018 -0700
@@ -703,7 +703,7 @@
 
         tf = tp.transplantfilter(repo, source, p1)
         if opts.get('prune'):
-            prune = set(source.lookup(r)
+            prune = set(source[r].node()
                         for r in scmutil.revrange(source, opts.get('prune')))
             matchfn = lambda x: tf(x) and x not in prune
         else:
@@ -712,7 +712,7 @@
         revmap = {}
         if revs:
             for r in scmutil.revrange(source, revs):
-                revmap[int(r)] = source.lookup(r)
+                revmap[int(r)] = source[r].node()
         elif opts.get('all') or not merges:
             if source != repo:
                 alltransplants = incwalk(source, csets, match=matchfn)