Patchwork D6335: copies: make "limit" argument to _tracefile() mandatory

login
register
mail settings
Submitter phabricator
Date May 3, 2019, 11:12 p.m.
Message ID <d5116c2a76b9fb4db915e1e91c20f624@localhost.localdomain>
Download mbox | patch
Permalink /patch/39936/
State Not Applicable
Headers show

Comments

phabricator - May 3, 2019, 11:12 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc74226916c8c: copies: make &quot;limit&quot; argument to _tracefile() mandatory (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6335?vs=14988&id=14997

REVISION DETAIL
  https://phab.mercurial-scm.org/D6335

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -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):