[PATCH 1 of 2] phases: add a phase and phasestr method to file context

Sean Farley sean.michael.farley at gmail.com
Wed Oct 17 12:47:32 CDT 2012


On Wed, Oct 17, 2012 at 12:30 PM, Kevin Bullock
<kbullock+mercurial at ringworld.org> wrote:
> On Oct 17, 2012, at 10:38 AM, Sean Farley wrote:
>
> On Wed, Oct 17, 2012 at 10:33 AM, Pierre-Yves David
> <pierre-yves.david at logilab.fr> wrote:
>
> On Wed, Oct 17, 2012 at 10:28:20AM -0500, Sean Farley wrote:
>
> # HG changeset patch
>
> # User Sean Farley <sean.michael.farley at gmail.com>
>
> # Date 1350425390 18000
>
> # Node ID 072adc076e641990cf0000ece34e9545ebaaa0b3
>
> # Parent  72c234081ae1350220132c69750f5a093902a1e7
>
> phases: add a phase and phasestr method to file context
>
>
> Hey? we already have them!
>
>
> But not for filecxt :-( ... unless I am missing something about
> wanting to call 'ctx.phasestr()' without having to test whether it is
> a changectx or filectx?
>
>
> Hmm, what are the situations in which you might want to do that? Do file
> changes actually have a phase themselves, or just changesets?

The short answer is that my next patch fails without this change
because it just blindly calls ctx.phasestr(). Since a file change is
part of a changeset, which has a phase, this just passes the same
information along (and allows us to not have to check for changectx
vs. filectx). Should this be added to the other classes, too? I can
imagine that doing an in-memory operation might want its phase but
perhaps it's too early without a concrete case.


More information about the Mercurial-devel mailing list