[PATCH] phases: fix bug where native phase computation wasn't called

Laurent Charignon lcharignon at fb.com
Fri May 29 21:27:16 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1432934690 25200
#      Fri May 29 14:24:50 2015 -0700
# Node ID c44df63327097227a267891813f335b154855409
# Parent  6ac860f700b5cfeda232d5305963047696b869ca
phases: fix bug where native phase computation wasn't called

I forgot to include this change as a previous diff and the native code to
compute the phases was never called. The AttributeError was silently caught and
the pure implementation was used instead.

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -178,7 +178,7 @@
         nativeroots = []
         for phase in trackedphases:
             nativeroots.append(map(repo.changelog.rev, self.phaseroots[phase]))
-        return repo.changelog.computephasesmapsets(nativeroots)
+        return repo.changelog.computephases(nativeroots)
 
     def _computephaserevspure(self, repo):
         repo = repo.unfiltered()
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -726,7 +726,7 @@
             return self._headrevs()
 
     def computephases(self, roots):
-        return self.index.computephases(roots)
+        return self.index.computephasesmapsets(roots)
 
     def _headrevs(self):
         count = len(self)


More information about the Mercurial-devel mailing list