Mercurial > hg-stable
comparison mercurial/phases.py @ 39302:b17d27ea61fb
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.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 23 Aug 2018 01:48:39 +0200 |
parents | 160bd45cc6af |
children | 278eb4541758 |
comparison
equal
deleted
inserted
replaced
39301:31c0ee6eb0ac | 39302:b17d27ea61fb |
---|---|
597 # | 597 # |
598 # run the update (and fetch transaction) only if there are actually things | 598 # run the update (and fetch transaction) only if there are actually things |
599 # to update. This avoid creating empty transaction during no-op operation. | 599 # to update. This avoid creating empty transaction during no-op operation. |
600 | 600 |
601 for phase in allphases[:-1]: | 601 for phase in allphases[:-1]: |
602 revset = '%%ln - %s()' % phasenames[phase] | 602 revset = '%%ln - _phase(%d)' % phase |
603 heads = [c.node() for c in repo.set(revset, headsbyphase[phase])] | 603 heads = [c.node() for c in repo.set(revset, headsbyphase[phase])] |
604 if heads: | 604 if heads: |
605 advanceboundary(repo, trgetter(), phase, heads) | 605 advanceboundary(repo, trgetter(), phase, heads) |
606 | 606 |
607 def analyzeremotephases(repo, subset, roots): | 607 def analyzeremotephases(repo, subset, roots): |