From patchwork Tue Apr 3 22:09:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3048: bundle: avoid repo.lookup() for converting revnum to nodeid From: phabricator X-Patchwork-Id: 30215 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Tue, 3 Apr 2018 22:09:07 +0000 martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3048 AFFECTED FILES mercurial/commands.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1224,8 +1224,8 @@ if dest: raise error.Abort(_("--base is incompatible with specifying " "a destination")) - common = [repo.lookup(rev) for rev in base] - heads = [repo.lookup(r) for r in revs] if revs else None + common = [repo[rev].node() for rev in base] + heads = [repo[r].node() for r in revs] if revs else None outgoing = discovery.outgoing(repo, common, heads) else: dest = ui.expandpath(dest or 'default-push', dest or 'default')