Call for discussion: Phase names

Faheem Mitha faheem at email.unc.edu
Wed Jan 11 23:52:42 CST 2012


On Thu, 12 Jan 2012 00:57:01 +0100, Olav Reinert <seroton10 at gmail.com> wrote:

> Given the background above, and the fact that the search for these
> phase names has been rather agonizing, I started considering the
> following:

> As far as I have understood it, the point of introducing phases is
> primarily to enable Mercurial to determine when a history rewrite
> operation is safe. Thus, the> most important change in the behavior
> of Mercurial, from a user's point of view, is that it sometimes
> makes smarter choices, or gives better warnings/errors.

> Because history already passed on to other clones is the reason why
> history rewrites may be unsafe, phases also includes mechanisms for
> preventing (or at least warning about) premature sharing of
> history. I also assume that Mercurial will manage most phase
> transitions automatically, using sensible defaults. That is, the
> majority of the common Mercurial use cases do not require explicit
> phase manipulations at all.

> If the above is true, it seems to me that the rule about unique
> initial letters for phase names, and requiring the ability to
> specify a phase using only a single-letter option (instead of
> writing something like "-p draft") is way too much to ask for. To me
> it is almost as absurd as forbidding options starting with [0-9a-f]
> because we refuse to prefix hex revision numbers with "-r".

> If my assumptions above are true, and if the need to specify a phase
> name is actually a fairly rare use case, shouldn't we just drop
> those rules about the initial letter of phase names, and instead
> make peace with "-p <phase>"?

> Because then we could use public/draft/private as phase names. It
  seems to me that most people are OK with those names.

+1 for what it is worth, though I have already expressed similar
sentiments elsewhere. But it doesn't hurt to say it again. Never
understood this focus on the initial letter of names. What is so
terrible about using a different letter if necessary? It is done in
other places, as Jason points out. Well expressed argument, thanks.



More information about the Mercurial-devel mailing list