Skip to content
Snippets Groups Projects
Commit faa4b3fc authored by Matt Mackall's avatar Matt Mackall
Browse files

templater: makes branches work correctly with stringify (issue4108)

parent 4778f398
No related branches found
No related tags found
No related merge requests found
......@@ -188,6 +188,7 @@
branch = args['ctx'].branch()
if branch != 'default':
return showlist('branch', [branch], plural='branches', **args)
return showlist('branch', [], plural='branches', **args)
def showbookmarks(**args):
""":bookmarks: List of strings. Any bookmarks associated with the
......
......@@ -1606,3 +1606,8 @@
{rev}
$ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
test 0
Test branches inside if statement:
$ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
no
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment