[PATCH] phases: make two functions private for phase computation

Laurent Charignon lcharignon at fb.com
Mon Mar 30 22:55:36 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1427755104 25200
#      Mon Mar 30 15:38:24 2015 -0700
# Node ID ed8c6f1a3d0c53353d319d7f20f2840760aba4b8
# Parent  4550c9cc72073e164987d8eb057fe8f46cd85dbb
phases: make two functions private for phase computation

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -172,14 +172,14 @@
         for a in 'phaseroots dirty opener _phaserevs'.split():
             setattr(self, a, getattr(phcache, a))
 
-    def getphaserevsnative(self, repo):
+    def _getphaserevsnative(self, repo):
         repo = repo.unfiltered()
         nativeroots = []
         for phase in trackedphases:
             nativeroots.append(map(repo.changelog.rev, self.phaseroots[phase]))
         return repo.changelog.computephases(nativeroots)
 
-    def computephaserevspure(self, repo):
+    def _computephaserevspure(self, repo):
         repo = repo.unfiltered()
         revs = [public] * len(repo.changelog)
         self._phaserevs = revs
@@ -197,11 +197,11 @@
             try:
                 if repo.ui.configbool('experimental',
                                       'nativephaseskillswitch'):
-                    self.computephaserevspure(repo)
+                    self._computephaserevspure(repo)
                 else:
-                    self._phaserevs = self.getphaserevsnative(repo)
+                    self._phaserevs = self._getphaserevsnative(repo)
             except AttributeError:
-                self.computephaserevspure(repo)
+                self._computephaserevspure(repo)
         return self._phaserevs
 
     def invalidate(self):


More information about the Mercurial-devel mailing list