changeset 42241:c74226916c8c

copies: make "limit" argument to _tracefile() mandatory We always pass a limit. I think the fact that it was optional was also the reason we checked ">=limit" before we used it. So now we can remove that condition too. Differential Revision: https://phab.mercurial-scm.org/D6335
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 27 Apr 2019 22:08:45 -0700
parents 39b63f9d7464
children 1756859a65fa
files mercurial/copies.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/copies.py	Fri May 03 08:37:10 2019 -0700
+++ b/mercurial/copies.py	Sat Apr 27 22:08:45 2019 -0700
@@ -152,14 +152,14 @@
 
     return t
 
-def _tracefile(fctx, am, limit=node.nullrev):
+def _tracefile(fctx, am, limit):
     """return file context that is the ancestor of fctx present in ancestor
     manifest am, stopping after the first ancestor lower than limit"""
 
     for f in fctx.ancestors():
         if am.get(f.path(), None) == f.filenode():
             return f
-        if limit >= 0 and not f.isintroducedafter(limit):
+        if not f.isintroducedafter(limit):
             return None
 
 def _dirstatecopies(repo, match=None):