[PATCH 5 of 5] phase: use `_phase` revset instead of string interpolation
Boris Feld
boris.feld at octobus.net
Fri Aug 24 18:35:41 EDT 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1534981719 -7200
# Thu Aug 23 01:48:39 2018 +0200
# Node ID 4a975a8b96b56b9892ea6bc5ac7efeaf7d7d1a2f
# Parent 57160a3b6795cfde325662406d128d730c10e043
# EXP-Topic internal-phase.prepare
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 4a975a8b96b5
phase: use `_phase` revset instead of string interpolation
The previous code was hackyer and assume all phases had an associated revset.
The later might no longer be true once we introduce more internal phase.
diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -599,7 +599,7 @@ def updatephases(repo, trgetter, headsby
# to update. This avoid creating empty transaction during no-op operation.
for phase in allphases[:-1]:
- revset = '%%ln - %s()' % phasenames[phase]
+ revset = '%%ln - _phase(%d)' % phase
heads = [c.node() for c in repo.set(revset, headsbyphase[phase])]
if heads:
advanceboundary(repo, trgetter(), phase, heads)
More information about the Mercurial-devel
mailing list