# HG changeset patch # User Martin von Zweigbergk # Date 2020-01-24 23:18:19 # Node ID 293cab97a766298d154db62dda731d5a7eb5839b # Parent bd4f666b55a7a7ed6487fc130b9b6c5033fa4642 merge: replace a repo.lookup('.') by more typical repo['.'].node() The `repo.lookup('.')` form comes from b3311e26f94f (merge: fix --preview to show all nodes that will be merged (issue2043)., 2010-02-15). I don't know why that commit changed from `repo['.']`, but I don't think there's any reason to do that. Note that performance should not be a reason (anymore?), because repo.lookup() is implemented by first creating a context object. Differential Revision: https://phab.mercurial-scm.org/D7998 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4881,7 +4881,7 @@ def merge(ui, repo, node=None, **opts): if opts.get(b'preview'): # find nodes that are ancestors of p2 but not of p1 - p1 = repo.lookup(b'.') + p1 = repo[b'.'].node() p2 = node nodes = repo.changelog.findmissing(common=[p1], heads=[p2])