phases: make two functions private for phase computation
authorLaurent Charignon <lcharignon@fb.com>
Mon, 30 Mar 2015 15:38:24 -0700
changeset 24599 2a73829ebe17
parent 24598 22f49c7dd11b
child 24600 ea24cf92557a
phases: make two functions private for phase computation
mercurial/phases.py
--- a/mercurial/phases.py	Wed Apr 01 00:31:41 2015 -0700
+++ b/mercurial/phases.py	Mon Mar 30 15:38:24 2015 -0700
@@ -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):