Patchwork D3051: transplant: avoid repo.lookup() for converting revnum to nodeid

login
register
mail settings
Submitter phabricator
Date April 3, 2018, 11:24 p.m.
Message ID <d4719b730fe47de3493d13a3c7a8c80b@localhost.localdomain>
Download mbox | patch
Permalink /patch/30221/
State Not Applicable
Headers show

Comments

phabricator - April 3, 2018, 11:24 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2a8939e25d07: transplant: avoid repo.lookup() for converting revnum to nodeid (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3051?vs=7582&id=7591

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

AFFECTED FILES
  hgext/transplant.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -703,16 +703,16 @@ 
 
         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:
             matchfn = tf
         merges = map(source.lookup, opts.get('merge', ()))
         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)