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

Matt Mackall mpm at selenic.com
Tue Jul 19 19:38:44 UTC 2011


On Tue, 2011-07-19 at 14:19 -0500, Augie Fackler wrote:
> 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.

Ok, I think our jargon here is suboptimal. We've got:

bookmarks: the set of all bookmarks in the project
current bookmarks: bookmarks that point to p1
active bookmarks: bookmarks that point to p1 and will get moved on
commit

I think we should list current bookmarks and star the active one.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list