# HG changeset patch # User Martin von Zweigbergk # Date 2019-01-15 19:07:34 # Node ID f3f5bfbf7e041f88d7db4f258b4f54319fefc2bd # Parent e3e1b06393756c277f00bba5e2cdd3ddd0832baf copies: use node.nullrev instead of literal -1 Differential Revision: https://phab.mercurial-scm.org/D5593 diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -131,7 +131,7 @@ def _chain(src, dst, a, b): return t -def _tracefile(fctx, am, limit=-1): +def _tracefile(fctx, am, limit=node.nullrev): """return file context that is the ancestor of fctx present in ancestor manifest am, stopping after the first ancestor lower than limit""" @@ -170,7 +170,7 @@ def _committedforwardcopies(a, b, match) % (a, b)) limit = _findlimit(repo, a.rev(), b.rev()) if limit is None: - limit = -1 + limit = node.nullrev if debug: dbg('debug.copies: search limit: %d\n' % limit) am = a.manifest()