Mercurial > hg-stable
comparison mercurial/commands.py @ 18622:f9eebf5629fa
summary: show active bookmark even if not at current changeset
Before this change, 'hg summary' would not show the active bookmark
unless it pointed to the working directory parent. After this change, it
will show it in parentheses, like so:
parent: 18581:f0ff45fe6700 tip
summary: simplify handling of active bookmark
branch: default
bookmarks: [crew]
commit: (clean)
update: (current)
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Fri, 08 Feb 2013 21:47:22 +0000 |
parents | b1e949f6c17d |
children | 0027a5cec9d0 |
comparison
equal
deleted
inserted
replaced
18621:b1e949f6c17d | 18622:f9eebf5629fa |
---|---|
5572 | 5572 |
5573 if marks: | 5573 if marks: |
5574 current = repo._bookmarkcurrent | 5574 current = repo._bookmarkcurrent |
5575 # i18n: column positioning for "hg summary" | 5575 # i18n: column positioning for "hg summary" |
5576 ui.write(_('bookmarks:'), label='log.bookmark') | 5576 ui.write(_('bookmarks:'), label='log.bookmark') |
5577 if current is not None and current in marks: | 5577 if current is not None: |
5578 ui.write(' *' + current, label='bookmarks.current') | 5578 if current in marks: |
5579 marks.remove(current) | 5579 ui.write(' *' + current, label='bookmarks.current') |
5580 marks.remove(current) | |
5581 else: | |
5582 ui.write('[%s]' % current, label='bookmarks.current') | |
5580 for m in marks: | 5583 for m in marks: |
5581 ui.write(' ' + m, label='log.bookmark') | 5584 ui.write(' ' + m, label='log.bookmark') |
5582 ui.write('\n', label='log.bookmark') | 5585 ui.write('\n', label='log.bookmark') |
5583 | 5586 |
5584 st = list(repo.status(unknown=True))[:6] | 5587 st = list(repo.status(unknown=True))[:6] |