Patrick Mezard <patrick@mezard.eu> [Sat, 12 May 2012 00:24:07 +0200] rev 16658
phases: make advance/retractboundary() atomic
Before this, if advanceboundary() failed after updating some roots but
before calling retractboundary(), the phase cache would be left in an
invalid state, marked dirty, and written as such. This patch approach is
to turn advance/retractboundary() into phasecache methods, then operate
on copies and merge them back on success.
With the same technique, we can ensure the atomicity of combinations of
advance/retractboundary() calls, like those performed in changegroup
handling code.
Patrick Mezard <patrick@mezard.eu> [Sat, 12 May 2012 00:24:07 +0200] rev 16657
phases: introduce phasecache
The original motivation was changectx.phase() had special logic to
correctly lookup in repo._phaserev, including invalidating it when
necessary. And at other places, repo._phaserev was accessed directly.
This led to the discovery that phases state including _phaseroots,
_phaserev and _dirtyphase was manipulated in localrepository.py,
phases.py, repair.py, etc. phasecache helps encapsulating that.
This patch replaces all phase state in localrepo with phasecache and
adjust related code except for advance/retractboundary() in phases.
These still access to phasecache internals directly. This will be
addressed in a followup.
Patrick Mezard <patrick@mezard.eu> [Sat, 12 May 2012 00:19:30 +0200] rev 16656
mq: introduce mq.check setting
When:
[mq]
check = True
is set, qpush, qpop and qgoto behave as if -c/--check were passed. If
incompatible options like -f/--force or --exact are set, this setting is
ignored.
This setting enables what many users expect mq default behaviour to be.
Patrick Mezard <patrick@mezard.eu> [Sat, 12 May 2012 00:19:30 +0200] rev 16655
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu> [Sat, 12 May 2012 00:19:30 +0200] rev 16654
mq: introduce qpush --check
qpush --check let you qpush with uncommitted files not overlapping
patched files.
Patrick Mezard <patrick@mezard.eu> [Sat, 12 May 2012 00:19:30 +0200] rev 16653
mq: introduce qpop --check
qpop --check let you qpop with uncommitted files if they do not
intersect with files touched by the popped patches.