[PATCH 5 of 5] phase: use `_phase` revset instead of string interpolation

Yuya Nishihara yuya at tcha.org
Sat Aug 25 04:35:58 EDT 2018


On Sat, 25 Aug 2018 00:35:41 +0200, Boris Feld wrote:
> # 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

Queued the series, thanks.

>      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])]

This can be written as repo.set('%ln - _phase(%s)', headsbyphase[phase], phase).


More information about the Mercurial-devel mailing list