[PATCH 7 of 7] help: rewrite template examples to not use shell escaping
Yuya Nishihara
yuya at tcha.org
Sun Jul 12 09:55:02 CDT 2015
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1436691565 -32400
# Sun Jul 12 17:59:25 2015 +0900
# Node ID 1d80ec69ca97be815499d00e21c8b6ee20a7485c
# Parent e12c8b4dbe016ba1c34fd30caabaa1c72c5b0194
help: rewrite template examples to not use shell escaping
Though they work fine even on cmd.exe, these examples could lead to misguided
understanding about the template syntax.
diff --git a/mercurial/help/templates.txt b/mercurial/help/templates.txt
--- a/mercurial/help/templates.txt
+++ b/mercurial/help/templates.txt
@@ -96,7 +96,7 @@ Some sample command line templates:
- Mark the active bookmark with '*'::
- $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
+ $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, active, '*')} '}\n"
- Mark the working copy parent with '@'::
@@ -104,7 +104,7 @@ Some sample command line templates:
- Show only commit descriptions that start with "template"::
- $ hg log --template "{startswith(\"template\", firstline(desc))}\n"
+ $ hg log --template "{startswith('template', firstline(desc))}\n"
- Print the first word of each line of a commit message::
More information about the Mercurial-devel
mailing list