Mercurial > hg > trac > jungle > src > mercurial-plugin
changeset 4:f261cc084df2 0.13
#10527: add bookmark support, shown as properties.
Patch authored by Peter Suter.
author | Christian Boos <cboos@edgewall.org> |
---|---|
date | Mon, 11 Jun 2012 23:06:28 +0200 |
parents | 8af21bda2b3e |
children | 852043605ea2 |
files | tracext/hg/backend.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tracext/hg/backend.py Sun Jun 10 22:41:07 2012 +0200 +++ b/tracext/hg/backend.py Mon Jun 11 23:06:28 2012 +0200 @@ -175,7 +175,8 @@ def match_property(self, name, mode): return (name.startswith('hg-') and - name[3:] in ('Parents', 'Children', 'Tags', 'Branch') and + name[3:] in ('Parents', 'Children', 'Tags', 'Branch', + 'Bookmarks') and mode == 'revprop') and 4 or 0 def render_property(self, name, mode, context, props): @@ -1209,6 +1210,9 @@ tags = self.get_tags() if len(tags): properties['hg-Tags'] = (self.repos, tags) + bookmarks = self.ctx.bookmarks() + if len(bookmarks): + properties['hg-Bookmarks'] = (self.repos, bookmarks) for k, v in self.ctx.extra().iteritems(): if k != 'branch': properties['hg-' + k] = (self.repos, v)