D4104: index: return False for "len(index) in index"

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sun Aug 5 09:04:38 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGaa33988ad8ab: index: return False for "len(index) in index" (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4104?vs=9907&id=9928

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

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1393,7 +1393,7 @@
 
 	if (PyInt_Check(value)) {
 		long rev = PyInt_AS_LONG(value);
-		return rev >= -1 && rev < index_length(self) + 1;
+		return rev >= -1 && rev < index_length(self);
 	}
 
 	if (node_check(value, &node) == -1)



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


More information about the Mercurial-devel mailing list