mercurial/phases.py
changeset 33457 61714c282106
parent 33453 f6b7617a85bb
child 33458 cf694e6422f0
--- a/mercurial/phases.py	Tue Jul 11 01:17:36 2017 +0200
+++ b/mercurial/phases.py	Wed Jul 12 23:15:09 2017 +0200
@@ -357,6 +357,7 @@
 
         repo = repo.unfiltered()
         currentroots = self.phaseroots[targetphase]
+        finalroots = oldroots = set(currentroots)
         newroots = [n for n in nodes
                     if self.phase(repo, repo[n].rev()) < targetphase]
         if newroots:
@@ -376,8 +377,10 @@
             finalroots = set(n for n in currentroots if repo[n].rev() <
                              minnewroot)
             finalroots.update(ctx.node() for ctx in updatedroots)
-
+        if finalroots != oldroots:
             self._updateroots(targetphase, finalroots, tr)
+            return True
+        return False
 
     def filterunknown(self, repo):
         """remove unknown nodes from the phase boundary