Adding phase support to TortoiseHG

Angel Ezquerra angel.ezquerra at gmail.com
Sat Jan 21 19:03:46 CST 2012


On Sun, Jan 22, 2012 at 1:34 AM, Angel Ezquerra Moreu
<angel.ezquerra at gmail.com> wrote:
> Hi,
>
> I'm working on adding phases support to TortoiseHg. I have a few
> questions that hopefully someone can help me with:
>
> - Looking at the code for the phases command, it seems that the
> easiest way to get the phase for each revision is to use the
> phasestr() method of the context object. Is that correct? I am worried
> that it may be expensive to call that method for each and every
> revision. Is there any other way?
>
> - What should be the phase that should be shown when TortoiseHg is
> shown in combination with an older mercurial version? Would that be
> "draft"?
>
> - What is the best way to tell if a repo has any phase data and
> whether it is a publishing or a non publishing repo? Old repos are
> considered non publishing, right?
>
> Thanks,
>
> Angel

I have a few more questions:
- do mq patches have phase information? If not, should they be
considered draft or secret?

- is the list of phase names publicly available in some accessible
list? I must show the list of phases in order to let the user change
the phase from the guy, but I'd rather not hard code the different
phase names

- is there an easy way to tell if we are trying to move the phase
backward? I'd like to warn the user and ask him if he wants to force
the phase change in that case. Since there are only 3 phases I could
simply take all possible cases into account, but I'd rather use a more
general solution, in case new phases are added in the future.

Thanks,

Angel


More information about the Mercurial-devel mailing list