# HG changeset patch # User Martin von Zweigbergk # Date 2019-01-15 17:20:47 # Node ID e3e1b06393756c277f00bba5e2cdd3ddd0832baf # Parent d2d716cc07002dcfb389cee03823cc56d613cd5c copies: use node.wdirrev instead of inventing another constant for it Differential Revision: https://phab.mercurial-scm.org/D5592 diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -46,22 +46,21 @@ def _findlimit(repo, a, b): # - quit when interesting revs is zero cl = repo.changelog - working = len(cl) # pseudo rev for the working directory if a is None: - a = working + a = node.wdirrev if b is None: - b = working + b = node.wdirrev side = {a: -1, b: 1} visit = [-a, -b] heapq.heapify(visit) interesting = len(visit) hascommonancestor = False - limit = working + limit = node.wdirrev while interesting: r = -heapq.heappop(visit) - if r == working: + if r == node.wdirrev: parents = [cl.rev(p) for p in repo.dirstate.parents()] else: parents = cl.parentrevs(r)