[PATCH 2 of 2] summary: indicate the current bookmark with '*'

David Soria Parra dsp at php.net
Tue Jun 22 10:02:21 CDT 2010


On 2010-06-22, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> On Mon, Jun 21, 2010 at 23:58, Cesar Mena <cmena at pobox.com> wrote:
>> # HG changeset patch
>> # User Cesar Mena <cmena at pobox.com>
>> # Date 1277155241 14400
>> # Node ID 99431fbd97c234ee9166414d018fc189bb41c0ff
>> # Parent  a5d8bceda56cad38b105d30a08d19569fcfbbb37
>> summary: indicate the current bookmark with '*'
>>
>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>> --- a/mercurial/commands.py
>> +++ b/mercurial/commands.py
>> @@ -3469,6 +3469,11 @@
>>
>>     Returns 0 on success.
>>     """
>> +    def fmttag(t):
>> +        if repo.tagtype(t) == 'bookmark':
>> +            if repo._bookmarkcurrent == t:
>> +                t = '*' + t
>> +        return t
>>
>>     ctx = repo[None]
>>     parents = ctx.parents()
>
> Hmm, if we want to expose _bookmarkcurrent, maybe it should have another name?

As we have setcurrent(repo, mark) already, we probably want to have current(repo).



More information about the Mercurial-devel mailing list