Patchwork D5593: copies: use node.nullrev instead of literal -1

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2019, 8:07 a.m.
Message ID <64dca34f8e27bd58222b3d866fca0b4f@localhost.localdomain>
Download mbox | patch
Permalink /patch/37780/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2019, 8:07 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf3f5bfbf7e04: copies: use node.nullrev instead of literal -1 (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5593?vs=13231&id=13242

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

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




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

Patch

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()