D3190: merge: avoid unnecessary conversion from binary nodeid to binary nodeid

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sun Apr 8 16:03:57 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  "node" is already a binary nodeid here, so there's no need to convert
  it. repo.lookup() will soon lose support for binary nodeids as input.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3587,7 +3587,7 @@
     if opts.get('preview'):
         # find nodes that are ancestors of p2 but not of p1
         p1 = repo.lookup('.')
-        p2 = repo.lookup(node)
+        p2 = node
         nodes = repo.changelog.findmissing(common=[p1], heads=[p2])
 
         displayer = logcmdutil.changesetdisplayer(ui, repo, opts)



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


More information about the Mercurial-devel mailing list