[PATCH] summary: show current bookmark if any (issue2892)

Augie Fackler durin42 at gmail.com
Tue Jul 19 19:19:26 UTC 2011


On Tue, Jul 19, 2011 at 2:16 PM, Augie Fackler <durin42 at gmail.com> wrote:
> # HG changeset patch
> # User Augie Fackler <durin42 at gmail.com>
> # Date 1310993606 18000
> # Node ID 28c9f23bb19bb3e89384a42eb5a2af60863bc47e
> # Parent  946f4381c1cb768939f4edd9c7764c3a157843ee
> summary: show current bookmark if any (issue2892)
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -4747,6 +4747,10 @@
>     else:
>         ui.status(m, label='log.branch')
>
> +    mark = repo._bookmarkcurrent
> +    if mark is not None:
> +        ui.write(_('bookmark: %s\n') % mark, label='log.bookmark')
> +
>     st = list(repo.status(unknown=True))[:6]
>
>     c = repo.dirstate.copies()
> diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
> --- a/tests/test-bookmarks.t
> +++ b/tests/test-bookmarks.t
> @@ -242,6 +242,7 @@
>   parent: 2:db815d6d32e6 tip Y Z x  y
>    2
>   branch: default
> +  bookmark: Z

I'm open to bikeshedding here. "current bookmark" looked awful next to
the other fields here, but just saying "bookmark" seems a tad
ambiguous since there could be multiple bookmarks and this is simply
the active one.

>   commit: (clean)
>   update: 1 new changesets, 2 branch heads (merge)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>



More information about the Mercurial-devel mailing list