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

Dirkjan Ochtman dirkjan at ochtman.nl
Tue Jun 22 04:33:51 CDT 2010


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?

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list