Comments
Patch
@@ -591,6 +591,12 @@
ctx, repo = ctxrepo('revbisect', context, mapping, args)
return hbisect.label(repo, ctx.node())
+def revbranches(context, mapping, args):
+ """:revbranches(rev): Show branches.
+ See :hg:`help templates.branch`."""
+ ctx, repo = ctxrepo('revbranches', context, mapping, args)
+ return ctx.branch()
+
def revset(context, mapping, args):
""":revset(query[, formatargs...]): Execute a revision set query. See
:hg:`help revset`."""
@@ -788,6 +794,7 @@
"pad": pad,
"revauthor": revauthor,
"revbisect": revbisect,
+ "revbranches": revbranches,
"revdesc": revdesc,
"revfiles": revfiles,
"revset": revset,
@@ -2119,6 +2119,9 @@
bisect:
bisect: good
+ $ hg log -r 0 --template '{revset("0::0") % "branch:\t{revision|revbranches}\n\n"}'
+ branch: default
+
$ hg log -r . --template '{revdesc()}'
hg: parse error: revdesc expects one argument
[255]