[PATCH 1 of 4] phases: simplify revset in updatephases

Boris Feld boris.feld at octobus.net
Mon Aug 27 10:39:53 UTC 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1535188813 -7200
#      Sat Aug 25 11:20:13 2018 +0200
# Node ID 1a32c924756abb3794e81d3fa19136939d83d5e5
# Parent  b17d27ea61fb0105abb53e74ff0973ba93574bd6
# EXP-Topic internal-phase.new-phase
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 1a32c924756a
phases: simplify revset in updatephases

(Pointed by Yuya Nishihara)

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -599,8 +599,8 @@ def updatephases(repo, trgetter, headsby
     # to update. This avoid creating empty transaction during no-op operation.
 
     for phase in allphases[:-1]:
-        revset = '%%ln - _phase(%d)' % phase
-        heads = [c.node() for c in repo.set(revset, headsbyphase[phase])]
+        revset = '%ln - _phase(%s)'
+        heads = [c.node() for c in repo.set(revset, headsbyphase[phase], phase)]
         if heads:
             advanceboundary(repo, trgetter(), phase, heads)
 


More information about the Mercurial-devel mailing list