D5593: copies: use node.nullrev instead of literal -1
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Jan 16 00:27:30 UTC 2019
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/D5593
AFFECTED FILES
mercurial/copies.py
CHANGE DETAILS
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -131,7 +131,7 @@
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 @@
% (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()
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list