changeset 35442:56745e58df07

phases: initialize number of loaded revisions to 0 As it isn't a revision number, an empty value should be 0, not -1.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 14 Dec 2017 22:37:10 +0900
parents 98cc121099fe
children a8478b808f17
files mercurial/phases.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/phases.py	Thu Dec 14 22:35:37 2017 +0900
+++ b/mercurial/phases.py	Thu Dec 14 22:37:10 2017 +0900
@@ -203,7 +203,7 @@
         if _load:
             # Cheap trick to allow shallow-copy without copy module
             self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
-            self._loadedrevslen = nullrev
+            self._loadedrevslen = 0
             self._phasesets = None
             self.filterunknown(repo)
             self.opener = repo.svfs
@@ -294,7 +294,7 @@
                 self._computephaserevspure(repo)
 
     def invalidate(self):
-        self._loadedrevslen = nullrev
+        self._loadedrevslen = 0
         self._phasesets = None
 
     def phase(self, repo, rev):