##// END OF EJS Templates
summary: add bookmarks to summary
David Soria Parra -
r13454:afc84a87 stable
parent child Browse files
Show More
@@ -3705,6 +3705,8 b' def summary(ui, repo, **opts):'
3705 3705 ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
3706 3706 label='log.changeset')
3707 3707 ui.write(' '.join(p.tags()), label='log.tag')
3708 if p.bookmarks():
3709 ui.write(' ' + ' '.join(p.bookmarks()), label='log.bookmark')
3708 3710 if p.rev() == -1:
3709 3711 if not len(repo):
3710 3712 ui.write(_(' (empty repository)'))
@@ -3824,6 +3826,15 b' def summary(ui, repo, **opts):'
3824 3826 o = repo.changelog.nodesbetween(o, None)[0]
3825 3827 if o:
3826 3828 t.append(_('%d outgoing') % len(o))
3829 if 'bookmarks' in other.listkeys('namespaces'):
3830 lmarks = repo.listkeys('bookmarks')
3831 rmarks = other.listkeys('bookmarks')
3832 diff = set(rmarks) - set(lmarks)
3833 if len(diff) > 0:
3834 t.append(_('%d incoming bookmarks') % len(diff))
3835 diff = set(lmarks) - set(rmarks)
3836 if len(diff) > 0:
3837 t.append(_('%d outgoing bookmarks') % len(diff))
3827 3838
3828 3839 if t:
3829 3840 ui.write(_('remote: %s\n') % (', '.join(t)))
@@ -225,3 +225,12 b' invalid bookmark'
225 225 abort: bookmark 'foo:bar' contains illegal character
226 226 [255]
227 227
228 test summary
229
230 $ hg summary
231 parent: 2:db815d6d32e6 tip Y Z x y
232 2
233 branch: default
234 commit: (clean)
235 update: 1 new changesets, 2 branch heads (merge)
236
General Comments 0
You need to be logged in to leave comments. Login now