Mercurial > public > mercurial-scm > hg
diff hgext/transplant.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 | 5dfd1c49dcc5 |
children | 80deae3bc5ea |
line wrap: on
line diff
--- a/hgext/transplant.py Sat Oct 23 19:21:51 2010 +0200 +++ b/hgext/transplant.py Sat Oct 23 19:22:42 2010 +0200 @@ -17,7 +17,7 @@ import os, tempfile from mercurial import bundlerepo, cmdutil, hg, merge, match from mercurial import patch, revlog, util, error -from mercurial import revset, help +from mercurial import revset class transplantentry(object): def __init__(self, lnode, rnode): @@ -589,6 +589,9 @@ os.unlink(bundle) def revsettransplanted(repo, subset, x): + """``transplanted(set)`` + Transplanted changesets in set. + """ if x: s = revset.getset(repo, subset, x) else: @@ -599,17 +602,7 @@ cs.add(r) return [r for r in s if r in cs] -def revsetdoc(): - doc = help.loaddoc('revsets')() - doc += _('\nAdded by the transplant extension:\n\n' - '``transplanted(set)``\n' - ' Transplanted changesets in set.\n') - return doc - -def uisetup(ui): - 'Add the transplanted revset predicate' - for i in (i for i, x in enumerate(help.helptable) if x[0] == ['revsets']): - help.helptable[i] = (['revsets'], _("Specifying Revision Sets"), revsetdoc) +def extsetup(ui): revset.symbols['transplanted'] = revsettransplanted cmdtable = {