# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1513258630 -32400
#      Thu Dec 14 22:37:10 2017 +0900
# Node ID a1744bbbec20259e7d2fed8733fd07031abbeb43
# Parent  54f71d88d66d59e557a7224d5d96164bded3292d
phases: initialize number of loaded revisions to 0

As it isn't a revision number, an empty value should be 0, not -1.

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -203,7 +203,7 @@ class phasecache(object):
         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 @@ class phasecache(object):
                 self._computephaserevspure(repo)
 
     def invalidate(self):
-        self._loadedrevslen = nullrev
+        self._loadedrevslen = 0
         self._phasesets = None
 
     def phase(self, repo, rev):
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to