Mercurial > hg
diff hgext/bookmarks.py @ 12822:f13acb96b2a7 stable
Fix and unify transplant and bookmarks revsets doc registration
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 23 Oct 2010 19:22:42 +0200 |
parents | 4212fdc4db18 |
children | 80deae3bc5ea |
line wrap: on
line diff
--- a/hgext/bookmarks.py Sat Oct 23 19:21:51 2010 +0200 +++ b/hgext/bookmarks.py Sat Oct 23 19:22:42 2010 +0200 @@ -538,6 +538,9 @@ return res def bmrevset(repo, subset, x): + """``bookmark([name])`` + The named bookmark or all bookmarks. + """ args = revset.getargs(x, 0, 1, _('bookmark takes one or no arguments')) if args: bm = revset.getstring(args[0], @@ -548,14 +551,9 @@ return [r for r in subset if r == bmrev] bms = set([repo.changelog.rev(bin(r)) for r in listbookmarks(repo).values()]) return [r for r in subset if r in bms] -revset.symbols['bookmark'] = bmrevset -def revsetdoc(): - doc = help.loaddoc('revsets')() - doc += _('\nAdded by the bookmarks extension:\n\n' - '``bookmark([name])``\n' - ' The named bookmark or all bookmarks.\n') - return doc +def extsetup(ui): + revset.symbols['bookmark'] = bmrevset cmdtable = { "bookmarks":