[PATCH 2 of 2] summary: indicate the current bookmark with '*'
Cesar Mena
cmena at pobox.com
Mon Jun 21 16:58:08 CDT 2010
# 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()
@@ -3479,7 +3484,7 @@
# shows a working directory parent *changeset*:
ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
label='log.changeset')
- ui.write(' '.join(p.tags()), label='log.tag')
+ ui.write(' '.join([fmttag(t) for t in p.tags()]), label='log.tag')
if p.rev() == -1:
if not len(repo):
ui.write(_(' (empty repository)'))
More information about the Mercurial-devel
mailing list