[PATCH 6 of 9 phases] phase: Add a method to compute rich phase data for dirstate
Matt Mackall
mpm at selenic.com
Fri Jan 6 04:14:50 UTC 2012
On Thu, 2012-01-05 at 02:25 +0100, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1325726360 -3600
> # Node ID 14124d106c8873e80ffcdb8e3332f277e53534dc
> # Parent 9bedf170a2c4753b01296db5f8dc8141cd3a64ed
> phase: Add a method to compute rich phase data for dirstate
s/Add/add/
> This method gather all logic related to new commit phase selection:
>
> * default new commit phase
> * parent phase
> * dirstate phase
The complexity here is scary.
Let me emphasize: I do not want even expert users to have to think about
what phase they're in, let alone spend a bunch of time fiddling with it.
You are over-thinking this before we have sufficient experience with it.
> diff --git a/mercurial/phases.py b/mercurial/phases.py
> --- a/mercurial/phases.py
> +++ b/mercurial/phases.py
> @@ -281,3 +281,28 @@
> phaseheads[phase].extend(c.node() for c in revset)
> return phaseheads, phaseroots
>
> +def dirstatephase(repo):
Passing a repo object to dirstate is a cardinal sin.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list