changeset 45910:fc4fb2f17dd4

errors: use exit code 10 for parse errors Now that `ParseError`s raised while reading the config file has been converted into `ConfigError`s, the remaining parse errors should all be "input errors" (i.e. exit code 10), according to https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9332
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 16 Nov 2020 16:00:50 -0800
parents 9dc1351d0b5f
children e359af6517ce
files mercurial/scmutil.py tests/test-annotate.t tests/test-commit.t tests/test-default-push.t tests/test-diffdir.t tests/test-export.t tests/test-extdata.t tests/test-fileset.t tests/test-glog-beautifygraph.t tests/test-glog.t tests/test-grep.t tests/test-histedit-arguments.t tests/test-histedit-edit.t tests/test-histedit-fold.t tests/test-lfs.t tests/test-log-linerange.t tests/test-log.t tests/test-logexchange.t tests/test-merge4.t tests/test-parse-date.t tests/test-revset-legacy-lookup.t tests/test-revset.t tests/test-revset2.t tests/test-template-basic.t tests/test-template-functions.t tests/test-template-graph.t tests/test-template-map.t
diffstat 27 files changed, 267 insertions(+), 267 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Fri Nov 20 14:43:21 2020 -0800
+++ b/mercurial/scmutil.py	Mon Nov 16 16:00:50 2020 -0800
@@ -222,7 +222,7 @@
     except error.WdirUnsupported:
         ui.error(_(b"abort: working directory revision cannot be specified\n"))
     except error.Abort as inst:
-        if isinstance(inst, error.InputError):
+        if isinstance(inst, (error.InputError, error.ParseError)):
             detailed_exit_code = 10
         elif isinstance(inst, error.StateError):
             detailed_exit_code = 20
--- a/tests/test-annotate.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-annotate.t	Mon Nov 16 16:00:50 2020 -0800
@@ -930,34 +930,34 @@
   $ hg up 24 --quiet
   $ hg log -r 'followlines()'
   hg: parse error: followlines takes at least 1 positional arguments
-  [255]
+  [10]
   $ hg log -r 'followlines(baz)'
   hg: parse error: followlines requires a line range
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, x)'
   hg: parse error: followlines expects a line number or a range
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, 1:2, startrev=desc("b"))'
   hg: parse error: followlines expects exactly one revision
-  [255]
+  [10]
   $ hg log -r 'followlines("glob:*", 1:2)'
   hg: parse error: followlines expects exactly one file
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, 1:)'
   hg: parse error: line range bounds must be integers
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, :1)'
   hg: parse error: line range bounds must be integers
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, x:4)'
   hg: parse error: line range bounds must be integers
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, 5:4)'
   hg: parse error: line range must be positive
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, 0:4)'
   hg: parse error: fromline must be strictly positive
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, 2:40)'
   abort: line range exceeds file size
   [10]
@@ -965,10 +965,10 @@
   hg: parse error at 43: not a prefix: [
   (followlines(baz, 2:4, startrev=20, descend=[1])
                                               ^ here)
-  [255]
+  [10]
   $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)'
   hg: parse error: descend argument must be a boolean
-  [255]
+  [10]
 
 Test empty annotate output
 
--- a/tests/test-commit.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-commit.t	Mon Nov 16 16:00:50 2020 -0800
@@ -16,20 +16,20 @@
   $ echo foo >> foo
   $ hg commit -d '1 4444444' -m commit-3
   hg: parse error: impossible time zone offset: 4444444
-  [255]
+  [10]
   $ hg commit -d '1	15.1' -m commit-4
   hg: parse error: invalid date: '1\t15.1'
-  [255]
+  [10]
   $ hg commit -d 'foo bar' -m commit-5
   hg: parse error: invalid date: 'foo bar'
-  [255]
+  [10]
   $ hg commit -d ' 1 4444' -m commit-6
   $ hg commit -d '111111111111 0' -m commit-7
   hg: parse error: date exceeds 32 bits: 111111111111
-  [255]
+  [10]
   $ hg commit -d '-111111111111 0' -m commit-7
   hg: parse error: date exceeds 32 bits: -111111111111
-  [255]
+  [10]
   $ echo foo >> foo
   $ hg commit -d '1901-12-13 20:45:52 +0000' -m commit-7-2
   $ echo foo >> foo
@@ -39,10 +39,10 @@
   2 1901-12-13 20:45:52 +0000
   $ hg commit -d '1901-12-13 20:45:51 +0000' -m commit-7
   hg: parse error: date exceeds 32 bits: -2147483649
-  [255]
+  [10]
   $ hg commit -d '-2147483649 0' -m commit-7
   hg: parse error: date exceeds 32 bits: -2147483649
-  [255]
+  [10]
 
 commit added file that has been deleted
 
--- a/tests/test-default-push.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-default-push.t	Mon Nov 16 16:00:50 2020 -0800
@@ -137,13 +137,13 @@
   $ hg --config 'paths.default:pushrev=notdefined()' push
   pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
   hg: parse error: unknown identifier: notdefined
-  [255]
+  [10]
 
   $ hg --config 'paths.default:pushrev=(' push
   pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
   hg: parse error at 1: not a prefix: end
   ((
     ^ here)
-  [255]
+  [10]
 
   $ cd ..
--- a/tests/test-diffdir.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-diffdir.t	Mon Nov 16 16:00:50 2020 -0800
@@ -34,10 +34,10 @@
 
   $ hg diff -r ""
   hg: parse error: empty query
-  [255]
+  [10]
   $ hg diff -r tip -r ""
   hg: parse error: empty query
-  [255]
+  [10]
 
 Remove a file that was added via merge. Since the file is not in parent 1,
 it should not be in the diff.
--- a/tests/test-export.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-export.t	Mon Nov 16 16:00:50 2020 -0800
@@ -337,7 +337,7 @@
   hg: parse error at 3: unterminated template expansion
   (%m{
       ^ here)
-  [255]
+  [10]
   $ hg export -o '%\' tip
   abort: invalid format spec '%\' in output filename
   [255]
@@ -367,7 +367,7 @@
 
   $ hg export ""
   hg: parse error: empty query
-  [255]
+  [10]
   $ hg export 999
   abort: unknown revision '999'!
   [255]
--- a/tests/test-extdata.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-extdata.t	Mon Nov 16 16:00:50 2020 -0800
@@ -54,7 +54,7 @@
 
   $ hg log -qr "extdata()"
   hg: parse error: extdata takes at least 1 string argument
-  [255]
+  [10]
   $ hg log -qr "extdata(unknown)"
   abort: unknown extdata source 'unknown'
   [255]
@@ -73,7 +73,7 @@
   hg: parse error at 0: not a prefix: +
   (+---------------------------------------+
    ^ here)
-  [255]
+  [10]
 
 test template support:
 
@@ -95,17 +95,17 @@
 
   $ hg log -T "{extdata()}\n"
   hg: parse error: extdata expects one argument
-  [255]
+  [10]
   $ hg log -T "{extdata('unknown')}\n"
   abort: unknown extdata source 'unknown'
   [255]
   $ hg log -T "{extdata(unknown)}\n"
   hg: parse error: empty data source specified
   (did you mean extdata('unknown')?)
-  [255]
+  [10]
   $ hg log -T "{extdata('{unknown}')}\n"
   hg: parse error: empty data source specified
-  [255]
+  [10]
 
 we don't fix up relative file URLs, but we do run shell commands in repo root
 
--- a/tests/test-fileset.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-fileset.t	Mon Nov 16 16:00:50 2020 -0800
@@ -81,7 +81,7 @@
   $ fileset 'a_b'
   $ fileset '"\xy"'
   hg: parse error: invalid \x escape* (glob)
-  [255]
+  [10]
 
 Test invalid syntax
 
@@ -90,25 +90,25 @@
     (string 'added')
     None)
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset -v '()()'
   (func
     (group
       None)
     None)
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset -v -- '-x'
   (negate
     (symbol 'x'))
   hg: parse error: can't use negate operator in this context
-  [255]
+  [10]
   $ fileset -v -- '-()'
   (negate
     (group
       None))
   hg: parse error: can't use negate operator in this context
-  [255]
+  [10]
   $ fileset -p parsed 'a, b, c'
   * parsed:
   (list
@@ -117,23 +117,23 @@
     (symbol 'c'))
   hg: parse error: can't use a list in this context
   (see 'hg help "filesets.x or y"')
-  [255]
+  [10]
 
   $ fileset '"path":.'
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset 'path:foo bar'
   hg: parse error at 9: invalid token
-  [255]
+  [10]
   $ fileset 'foo:bar:baz'
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset 'foo:bar()'
   hg: parse error: pattern must be a string
-  [255]
+  [10]
   $ fileset 'foo:bar'
   hg: parse error: invalid pattern kind: foo
-  [255]
+  [10]
 
 Show parsed tree at stages:
 
@@ -562,7 +562,7 @@
   c1
   $ fileset 'grep("missingparens(")'
   hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \)).* (re)
-  [255]
+  [10]
 
 #if execbit
   $ chmod +x b2
@@ -589,11 +589,11 @@
   $ hg add 1k 2k
   $ fileset 'size("bar")'
   hg: parse error: couldn't parse size: bar
-  [255]
+  [10]
   $ fileset '(1k, 2k)'
   hg: parse error: can't use a list in this context
   (see 'hg help "filesets.x or y"')
-  [255]
+  [10]
   $ fileset 'size(1k)'
   1k
   $ fileset '(1k or 2k) and size("< 2k")'
@@ -1018,10 +1018,10 @@
 
   $ fileset "status('', '4', added())"
   hg: parse error: first argument to status must be a revision
-  [255]
+  [10]
   $ fileset "status('2', '', added())"
   hg: parse error: second argument to status must be a revision
-  [255]
+  [10]
 
 Empty revset will error at the revset layer
 
@@ -1029,9 +1029,9 @@
   hg: parse error at 1: not a prefix: end
   ( 
     ^ here)
-  [255]
+  [10]
   $ fileset "status('2', ' ', added())"
   hg: parse error at 1: not a prefix: end
   ( 
     ^ here)
-  [255]
+  [10]
--- a/tests/test-glog-beautifygraph.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-glog-beautifygraph.t	Mon Nov 16 16:00:50 2020 -0800
@@ -1682,7 +1682,7 @@
     <date '2 0 to 4 0'>>
   $ hg log -G -d 'brace ) in a date'
   hg: parse error: invalid date: 'brace ) in a date'
-  [255]
+  [10]
   $ testlog --prune 31 --prune 32
   []
   (not
--- a/tests/test-glog.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-glog.t	Mon Nov 16 16:00:50 2020 -0800
@@ -1532,7 +1532,7 @@
     <date '2 0 to 4 0'>>
   $ hg log -G -d 'brace ) in a date'
   hg: parse error: invalid date: 'brace ) in a date'
-  [255]
+  [10]
   $ testlog --prune 31 --prune 32
   []
   (not
--- a/tests/test-grep.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-grep.t	Mon Nov 16 16:00:50 2020 -0800
@@ -25,13 +25,13 @@
 
   $ hg log -r 'diffcontains()'
   hg: parse error: diffcontains takes at least 1 argument
-  [255]
+  [10]
   $ hg log -r 'diffcontains(:)'
   hg: parse error: diffcontains requires a string pattern
-  [255]
+  [10]
   $ hg log -r 'diffcontains("re:**test**")'
   hg: parse error: invalid regular expression: nothing to repeat* (glob)
-  [255]
+  [10]
 
 simple
 
--- a/tests/test-histedit-arguments.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-histedit-arguments.t	Mon Nov 16 16:00:50 2020 -0800
@@ -187,7 +187,7 @@
   > EOF
   hg: parse error: missing rules for changeset c8e68270e35a
   (use "drop c8e68270e35a" to discard, see also: 'hg help -e histedit.config')
-  [255]
+  [10]
 
 Test that extra revisions are detected
 ---------------------------------------
@@ -199,7 +199,7 @@
   > EOF
   hg: parse error: pick "6058cbb6cfd7" changeset was not a candidate
   (only use listed changesets)
-  [255]
+  [10]
 
 Test malformed line
 ---------------------------------------
@@ -210,7 +210,7 @@
   > pick 08d98a8350f3 4 five
   > EOF
   hg: parse error: malformed line "pickeb57da33312f2three"
-  [255]
+  [10]
 
 Test unknown changeset
 ---------------------------------------
@@ -221,7 +221,7 @@
   > pick 08d98a8350f3 4 five
   > EOF
   hg: parse error: unknown changeset 0123456789ab listed
-  [255]
+  [10]
 
 Test unknown command
 ---------------------------------------
@@ -232,7 +232,7 @@
   > pick 08d98a8350f3 4 five
   > EOF
   hg: parse error: unknown action "coin"
-  [255]
+  [10]
 
 Test duplicated changeset
 ---------------------------------------
@@ -245,7 +245,7 @@
   > pick 08d98a8350f3 4 five
   > EOF
   hg: parse error: duplicated command for changeset eb57da33312f
-  [255]
+  [10]
 
 Test bogus rev
 ---------------------------------------
@@ -256,7 +256,7 @@
   > pick 08d98a8350f3 4 five
   > EOF
   hg: parse error: invalid changeset 0u98
-  [255]
+  [10]
 
 Test short version of command
 ---------------------------------------
--- a/tests/test-histedit-edit.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-histedit-edit.t	Mon Nov 16 16:00:50 2020 -0800
@@ -463,7 +463,7 @@
   $ HGEDITOR="sh ../edit.sh" hg histedit 2
   warning: histedit rules saved to: .hg/histedit-last-edit.txt
   hg: parse error: first changeset cannot use verb "fold"
-  [255]
+  [10]
   $ cat .hg/histedit-last-edit.txt
   fold 0012be4a27ea 2 extend a
   
--- a/tests/test-histedit-fold.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-histedit-fold.t	Mon Nov 16 16:00:50 2020 -0800
@@ -588,7 +588,7 @@
   > r 5db65b93a12b
   > EOF
   hg: parse error: first changeset cannot use verb "roll"
-  [255]
+  [10]
   $ hg log -G -T '{node|short} {desc}'
   @  5db65b93a12b cc
   |
--- a/tests/test-lfs.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-lfs.t	Mon Nov 16 16:00:50 2020 -0800
@@ -70,7 +70,7 @@
   $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file"
   hg: parse error: unsupported file pattern: size(">1000B")
   (paths must be prefixed with "path:")
-  [255]
+  [10]
   $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file"
 
 # Commit large file
--- a/tests/test-log-linerange.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-log-linerange.t	Mon Nov 16 16:00:50 2020 -0800
@@ -1142,7 +1142,7 @@
   $ cd ..
   $ hg log -f -L glob:*a*,1:2
   hg: parse error: line range pattern 'glob:*a*' must match exactly one file
-  [255]
+  [10]
 
 We get an error for removed files.
 
--- a/tests/test-log.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-log.t	Mon Nov 16 16:00:50 2020 -0800
@@ -1063,7 +1063,7 @@
 
   $ hg log -r ''
   hg: parse error: empty query
-  [255]
+  [10]
 
 log -r <some unknown node id>
 
@@ -2435,7 +2435,7 @@
   hg: parse error at 14: unexpected token: end
   ({shortest(node}
                  ^ here)
-  [255]
+  [10]
 
 multi-line template with error
   $ hg log -r . -T 'line 1
@@ -2445,7 +2445,7 @@
   hg: parse error at 27: unexpected token: end
   (line 1\nline2\n{shortest(node}\nline4\nline5
                                 ^ here)
-  [255]
+  [10]
 
   $ cd ..
 
--- a/tests/test-logexchange.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-logexchange.t	Mon Nov 16 16:00:50 2020 -0800
@@ -500,15 +500,15 @@
 
   $ hg log -r 'remotenames("re:default", "re:server2")' -GT "{rev}:{node|short} {remotenames}\n"
   hg: parse error: only one argument accepted
-  [255]
+  [10]
 
   $ hg log -r 'remotebranches("default/wat", "server2/wat")' -GT "{rev}:{node|short} {remotebranches}\n"
   hg: parse error: only one argument accepted
-  [255]
+  [10]
 
   $ hg log -r 'remotebookmarks("default/foo", "server2/foo")' -GT "{rev}:{node|short} {remotebookmarks}\n"
   hg: parse error: only one argument accepted
-  [255]
+  [10]
 
 Testing pattern matching
 
--- a/tests/test-merge4.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-merge4.t	Mon Nov 16 16:00:50 2020 -0800
@@ -29,10 +29,10 @@
 # Bad usage
   $ hg log -r 'conflictlocal(foo)'
   hg: parse error: conflictlocal takes no arguments
-  [255]
+  [10]
   $ hg log -r 'conflictother(foo)'
   hg: parse error: conflictother takes no arguments
-  [255]
+  [10]
   $ hg co -C .
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 # No merge parents when not merging
--- a/tests/test-parse-date.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-parse-date.t	Mon Nov 16 16:00:50 2020 -0800
@@ -18,13 +18,13 @@
   $ echo "fail" >> a
   $ hg ci -d "should fail" -m "fail"
   hg: parse error: invalid date: 'should fail'
-  [255]
+  [10]
   $ hg ci -d "100000000000000000 1400" -m "fail"
   hg: parse error: date exceeds 32 bits: 100000000000000000
-  [255]
+  [10]
   $ hg ci -d "100000 1400000" -m "fail"
   hg: parse error: impossible time zone offset: 1400000
-  [255]
+  [10]
 
 Check with local timezone other than GMT and with DST
 
--- a/tests/test-revset-legacy-lookup.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-revset-legacy-lookup.t	Mon Nov 16 16:00:50 2020 -0800
@@ -172,10 +172,10 @@
   6:db72e24fe069 Added tag 1.2 for changeset ff42fde8edbb [release_4.1(candidate1)]
   $ hg log -r '(release_4.1(candidate1))'
   hg: parse error: unknown identifier: release_4.1
-  [255]
+  [10]
   $ hg log -r 'revset(release_4.1(candidate1))'
   hg: parse error: unknown identifier: release_4.1
-  [255]
+  [10]
   $ hg log -r '"release_4.1(candidate1)"'
   6:db72e24fe069 Added tag 1.2 for changeset ff42fde8edbb [release_4.1(candidate1)]
   $ hg log -r '("release_4.1(candidate1)")'
@@ -190,7 +190,7 @@
   6:db72e24fe069 Added tag 1.2 for changeset ff42fde8edbb [release_4.1(candidate1)]
   $ hg log -r '::release_4.1(candidate1)'
   hg: parse error: unknown identifier: release_4.1
-  [255]
+  [10]
 
 Test tag with parenthesis and other function like char
 
@@ -200,10 +200,10 @@
   7:b29b25d7d687 Added tag release_4.1(candidate1) for changeset db72e24fe069 [release_4.1(arch=x86,arm)]
   $ hg log -r '(release_4.1(arch=x86,arm))'
   hg: parse error: unknown identifier: release_4.1
-  [255]
+  [10]
   $ hg log -r 'revset(release_4.1(arch=x86,arm))'
   hg: parse error: unknown identifier: release_4.1
-  [255]
+  [10]
   $ hg log -r '"release_4.1(arch=x86,arm)"'
   7:b29b25d7d687 Added tag release_4.1(candidate1) for changeset db72e24fe069 [release_4.1(arch=x86,arm)]
   $ hg log -r '("release_4.1(arch=x86,arm)")'
@@ -219,7 +219,7 @@
   7:b29b25d7d687 Added tag release_4.1(candidate1) for changeset db72e24fe069 [release_4.1(arch=x86,arm)]
   $ hg log -r '::release_4.1(arch=x86,arm)'
   hg: parse error: unknown identifier: release_4.1
-  [255]
+  [10]
 
 Test tag conflicting with revset function
 
@@ -229,10 +229,10 @@
   8:6b2e2d4ea455 Added tag release_4.1(arch=x86,arm) for changeset b29b25d7d687 [secret(team=foo,project=bar)]
   $ hg log -r '(secret(team=foo,project=bar))'
   hg: parse error: secret takes no arguments
-  [255]
+  [10]
   $ hg log -r 'revset(secret(team=foo,project=bar))'
   hg: parse error: secret takes no arguments
-  [255]
+  [10]
   $ hg log -r '"secret(team=foo,project=bar)"'
   8:6b2e2d4ea455 Added tag release_4.1(arch=x86,arm) for changeset b29b25d7d687 [secret(team=foo,project=bar)]
   $ hg log -r '("secret(team=foo,project=bar)")'
@@ -249,7 +249,7 @@
   8:6b2e2d4ea455 Added tag release_4.1(arch=x86,arm) for changeset b29b25d7d687 [secret(team=foo,project=bar)]
   $ hg log -r '::secret(team=foo,project=bar)'
   hg: parse error: secret takes no arguments
-  [255]
+  [10]
 
 Test tag with space
 
@@ -261,12 +261,12 @@
   hg: parse error at 4: unexpected token: symbol
   ((my little version)
        ^ here)
-  [255]
+  [10]
   $ hg log -r 'revset(my little version)'
   hg: parse error at 10: unexpected token: symbol
   (revset(my little version)
              ^ here)
-  [255]
+  [10]
   $ hg log -r '"my little version"'
   9:269192bf8fc3 Added tag secret(team=foo,project=bar) for changeset 6b2e2d4ea455 [my little version]
   $ hg log -r '("my little version")'
@@ -286,4 +286,4 @@
   hg: parse error at 5: invalid token
   (::my little version
         ^ here)
-  [255]
+  [10]
--- a/tests/test-revset.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-revset.t	Mon Nov 16 16:00:50 2020 -0800
@@ -401,10 +401,10 @@
   hg: parse error at 10: unexpected token: symbol
   (date(this is a test)
              ^ here)
-  [255]
+  [10]
   $ log 'date()'
   hg: parse error: date requires a string
-  [255]
+  [10]
   $ log 'date'
   abort: unknown revision 'date'!
   [255]
@@ -412,13 +412,13 @@
   hg: parse error at 5: not a prefix: end
   (date(
         ^ here)
-  [255]
+  [10]
   $ log 'date("\xy")'
   hg: parse error: invalid \x escape* (glob)
-  [255]
+  [10]
   $ log 'date(tip)'
   hg: parse error: invalid date: 'tip'
-  [255]
+  [10]
   $ log '0:date'
   abort: unknown revision 'date'!
   [255]
@@ -450,7 +450,7 @@
 
   $ log '"date"(2005)'
   hg: parse error: not a symbol
-  [255]
+  [10]
 
 keyword arguments
 
@@ -459,25 +459,25 @@
 
   $ log 'extra(branch, a, b)'
   hg: parse error: extra takes at most 2 positional arguments
-  [255]
+  [10]
   $ log 'extra(a, label=b)'
   hg: parse error: extra got multiple values for keyword argument 'label'
-  [255]
+  [10]
   $ log 'extra(label=branch, default)'
   hg: parse error: extra got an invalid argument
-  [255]
+  [10]
   $ log 'extra(branch, foo+bar=baz)'
   hg: parse error: extra got an invalid argument
-  [255]
+  [10]
   $ log 'extra(unknown=branch)'
   hg: parse error: extra got an unexpected keyword argument 'unknown'
-  [255]
+  [10]
   $ log 'extra((), x)'
   hg: parse error: first argument to extra must be a string
-  [255]
+  [10]
   $ log 'extra(label=x, ())'
   hg: parse error: extra got an invalid argument
-  [255]
+  [10]
 
   $ try 'foo=bar|baz'
   (keyvalue
@@ -487,7 +487,7 @@
         (symbol 'bar')
         (symbol 'baz'))))
   hg: parse error: can't use a key-value pair in this context
-  [255]
+  [10]
 
  right-hand side should be optimized recursively
 
@@ -506,7 +506,7 @@
       (symbol '_notpublic')
       None))
   hg: parse error: can't use a key-value pair in this context
-  [255]
+  [10]
 
 relation-subscript operator has the highest binding strength (as function call):
 
@@ -565,7 +565,7 @@
     (symbol 'tip')
     (symbol '0'))
   hg: parse error: can't use a subscript in this context
-  [255]
+  [10]
 
   $ hg debugrevspec -p analyzed 'tip#rel[0]'
   * analyzed:
@@ -574,7 +574,7 @@
     (symbol 'rel')
     (symbol '0'))
   hg: parse error: unknown identifier: rel
-  [255]
+  [10]
 
   $ hg debugrevspec -p analyzed '(tip#rel)[0]'
   * analyzed:
@@ -584,7 +584,7 @@
       (symbol 'rel'))
     (symbol '0'))
   hg: parse error: can't use a subscript in this context
-  [255]
+  [10]
 
   $ hg debugrevspec -p analyzed 'tip#rel[0][1]'
   * analyzed:
@@ -595,7 +595,7 @@
       (symbol '0'))
     (symbol '1'))
   hg: parse error: can't use a subscript in this context
-  [255]
+  [10]
 
   $ hg debugrevspec -p analyzed 'tip#rel0#rel1[1]'
   * analyzed:
@@ -606,7 +606,7 @@
     (symbol 'rel1')
     (symbol '1'))
   hg: parse error: unknown identifier: rel1
-  [255]
+  [10]
 
   $ hg debugrevspec -p analyzed 'tip#rel0[0]#rel1[1]'
   * analyzed:
@@ -618,7 +618,7 @@
     (symbol 'rel1')
     (symbol '1'))
   hg: parse error: unknown identifier: rel1
-  [255]
+  [10]
 
 parse errors of relation, subscript and relation-subscript operators:
 
@@ -626,48 +626,48 @@
   hg: parse error at 0: not a prefix: [
   ([0]
    ^ here)
-  [255]
+  [10]
   $ hg debugrevspec '.#'
   hg: parse error at 2: not a prefix: end
   (.#
      ^ here)
-  [255]
+  [10]
   $ hg debugrevspec '#rel'
   hg: parse error at 0: not a prefix: #
   (#rel
    ^ here)
-  [255]
+  [10]
   $ hg debugrevspec '.#rel[0'
   hg: parse error at 7: unexpected token: end
   (.#rel[0
           ^ here)
-  [255]
+  [10]
   $ hg debugrevspec '.]'
   hg: parse error at 1: invalid token
   (.]
     ^ here)
-  [255]
+  [10]
 
   $ hg debugrevspec '.#generations[a]'
   hg: parse error: relation subscript must be an integer or a range
-  [255]
+  [10]
   $ hg debugrevspec '.#generations[1-2]'
   hg: parse error: relation subscript must be an integer or a range
-  [255]
+  [10]
   $ hg debugrevspec '.#generations[foo:bar]'
   hg: parse error: relation subscript bounds must be integers
-  [255]
+  [10]
 
 suggested relations
 
   $ hg debugrevspec '.#generafions[0]'
   hg: parse error: unknown identifier: generafions
   (did you mean generations?)
-  [255]
+  [10]
 
   $ hg debugrevspec '.#f[0]'
   hg: parse error: unknown identifier: f
-  [255]
+  [10]
 
 parsed tree at stages:
 
@@ -686,7 +686,7 @@
   * optimized:
   None
   hg: parse error: missing argument
-  [255]
+  [10]
 
   $ hg debugrevspec --no-optimized -p all '()'
   * parsed:
@@ -701,7 +701,7 @@
   * analyzed:
   None
   hg: parse error: missing argument
-  [255]
+  [10]
 
   $ hg debugrevspec -p parsed -p analyzed -p optimized '(0|1)-1'
   * parsed:
@@ -899,7 +899,7 @@
       (rangepre
         (symbol '2'))))
   hg: parse error: ^ expects a number 0, 1, or 2
-  [255]
+  [10]
 
  x^:y should be resolved recursively
 
@@ -1005,7 +1005,7 @@
     (rangepre
       (symbol '2')))
   hg: parse error: ^ expects a number 0, 1, or 2
-  [255]
+  [10]
 
 '::' itself isn't a valid expression
 
@@ -1013,7 +1013,7 @@
   (dagrangeall
     None)
   hg: parse error: can't use '::' in this context
-  [255]
+  [10]
 
 ancestor can accept 0 or more arguments
 
@@ -1170,10 +1170,10 @@
 
   $ log 'ancestors(., depth=-1)'
   hg: parse error: negative depth
-  [255]
+  [10]
   $ log 'ancestors(., depth=foo)'
   hg: parse error: ancestors expects an integer depth
-  [255]
+  [10]
 
 test descendants
 
@@ -1447,10 +1447,10 @@
     (symbol 'grep')
     (string '('))
   hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \),.*) (re)
-  [255]
+  [10]
   $ log 'desc("re:(")'
   hg: parse error: invalid regular expression: (unbalanced parenthesis|missing \),.*) (re)
-  [255]
+  [10]
   $ try 'grep("\bissue\d+")'
   (func
     (symbol 'grep')
@@ -1472,7 +1472,7 @@
   hg: parse error at 7: unterminated string
   (grep(r"\")
           ^ here)
-  [255]
+  [10]
   $ log 'head()'
   0
   1
@@ -1530,15 +1530,15 @@
   $ log 'limit(author("re:bob|test"), offset=10)'
   $ log 'limit(all(), 1, -1)'
   hg: parse error: negative offset
-  [255]
+  [10]
   $ log 'limit(all(), -1)'
   hg: parse error: negative number to select
-  [255]
+  [10]
   $ log 'limit(all(), 0)'
 
   $ log 'last(all(), -1)'
   hg: parse error: negative number to select
-  [255]
+  [10]
   $ log 'last(all(), 0)'
   $ log 'last(all(), 1)'
   9
@@ -1861,7 +1861,7 @@
   $ log 'rev(10)'
   $ log 'rev(tip)'
   hg: parse error: rev expects a number
-  [255]
+  [10]
 
 Test hexadecimal revision
   $ log 'id(2)'
@@ -1965,7 +1965,7 @@
   $ hg debugrevspec 'wdir()^2'
   $ hg debugrevspec 'wdir()^3'
   hg: parse error: ^ expects a number 0, 1, or 2
-  [255]
+  [10]
 For tests consistency
   $ hg up 9
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -2532,10 +2532,10 @@
 
   $ log '0:2 & sort()'
   hg: parse error: sort requires one or two arguments
-  [255]
+  [10]
   $ log '0:2 & sort(all(), -invalid)'
   hg: parse error: unknown sort key '-invalid'
-  [255]
+  [10]
 
  for 'A & f(B)', 'B' should not be affected by the order of 'A':
 
@@ -2762,7 +2762,7 @@
 
   $ log 'sort(all(), -invalid)'
   hg: parse error: unknown sort key '-invalid'
-  [255]
+  [10]
 
   $ cd ..
 
@@ -2980,11 +2980,11 @@
 
   $ hg log -r 'sort(all(), "topo user")'
   hg: parse error: topo sort order cannot be combined with other sort keys
-  [255]
+  [10]
 
   $ hg log -r 'sort(all(), user, topo.firstbranch=book1)'
   hg: parse error: topo.firstbranch can only be used when using the topo sort key
-  [255]
+  [10]
 
 topo.firstbranch should accept any kind of expressions:
 
@@ -3003,7 +3003,7 @@
   hg: parse error at 9: not a prefix: end
   ( . + .^ +
             ^ here)
-  [255]
+  [10]
   $ hg debugrevspec -v 'revset(first(rev(0)))' -p all
   * parsed:
   (func
@@ -3052,10 +3052,10 @@
 abort if the revset doesn't expect given size
   $ log 'expectsize()'
   hg: parse error: invalid set of arguments
-  [255]
+  [10]
   $ log 'expectsize(0:2, a)'
   hg: parse error: expectsize requires a size range or a positive integer
-  [255]
+  [10]
   $ log 'expectsize(0:2, 3)'
   0
   1
@@ -3070,7 +3070,7 @@
   [255]
   $ log 'expectsize(0:4, -1)'
   hg: parse error: negative size
-  [255]
+  [10]
   $ log 'expectsize(0:2, 2:4)'
   0
   1
@@ -3080,16 +3080,16 @@
   [255]
   $ log 'expectsize(0:1, -1:2)'
   hg: parse error: negative size
-  [255]
+  [10]
   $ log 'expectsize(0:1, 1:-2)'
   hg: parse error: negative size
-  [255]
+  [10]
   $ log 'expectsize(0:2, a:4)'
   hg: parse error: size range bounds must be integers
-  [255]
+  [10]
   $ log 'expectsize(0:2, 2:b)'
   hg: parse error: size range bounds must be integers
-  [255]
+  [10]
   $ log 'expectsize(0:2, 2:)'
   0
   1
--- a/tests/test-revset2.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-revset2.t	Mon Nov 16 16:00:50 2020 -0800
@@ -346,7 +346,7 @@
   $ log '0,1'
   hg: parse error: can't use a list in this context
   (see 'hg help "revsets.x or y"')
-  [255]
+  [10]
   $ try '0,1,2'
   (list
     (symbol '0')
@@ -354,7 +354,7 @@
     (symbol '2'))
   hg: parse error: can't use a list in this context
   (see 'hg help "revsets.x or y"')
-  [255]
+  [10]
 
 test that chained `or` operations make balanced addsets
 
@@ -407,7 +407,7 @@
       (symbol '0')
       None))
   hg: parse error: missing argument
-  [255]
+  [10]
 
 test that chained `or` operations never eat up stack (issue4624)
 (uses `0:1` instead of `0` to avoid future optimization of trivial revisions)
@@ -510,7 +510,7 @@
       (symbol '1'))
     None)
   hg: parse error: missing argument
-  [255]
+  [10]
 
 optimization to only() works only if ancestors() takes only one argument
 
@@ -568,20 +568,20 @@
 
   $ log '"ancestors"(6) and not ancestors(4)'
   hg: parse error: not a symbol
-  [255]
+  [10]
 
   $ log 'ancestors(6) and not "ancestors"(4)'
   hg: parse error: not a symbol
-  [255]
+  [10]
 
 test empty string
 
   $ log ''
   hg: parse error: empty query
-  [255]
+  [10]
   $ log 'parents("")'
   hg: parse error: empty string is not a valid revision
-  [255]
+  [10]
 
 test empty revset
   $ hg log 'none()'
@@ -701,7 +701,7 @@
   hg: parse error at 2: invalid token
   (1 OR 2
      ^ here)
-  [255]
+  [10]
 
 or operator should preserve ordering:
   $ log 'reverse(2::4) or tip'
@@ -755,7 +755,7 @@
 
   $ log 'tip^foo'
   hg: parse error: ^ expects a number 0, 1, or 2
-  [255]
+  [10]
 
   $ log 'branchpoint()~-1'
   abort: revision in set has more than one child!
@@ -765,29 +765,29 @@
   $ log 'add()'
   hg: parse error: unknown identifier: add
   (did you mean adds?)
-  [255]
+  [10]
   $ log 'added()'
   hg: parse error: unknown identifier: added
   (did you mean adds?)
-  [255]
+  [10]
   $ log 'remo()'
   hg: parse error: unknown identifier: remo
   (did you mean one of remote, removes?)
-  [255]
+  [10]
   $ log 'babar()'
   hg: parse error: unknown identifier: babar
-  [255]
+  [10]
 
 Bogus function with a similar internal name doesn't suggest the internal name
   $ log 'matches()'
   hg: parse error: unknown identifier: matches
   (did you mean matching?)
-  [255]
+  [10]
 
 Undocumented functions aren't suggested as similar either
   $ log 'tagged2()'
   hg: parse error: unknown identifier: tagged2
-  [255]
+  [10]
 
 multiple revspecs
 
@@ -949,7 +949,7 @@
   $ try recurse1
   (symbol 'recurse1')
   hg: parse error: infinite expansion of revset alias "recurse1" detected
-  [255]
+  [10]
 
   $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc
   $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc
@@ -1185,13 +1185,13 @@
     (symbol 'rs')
     None)
   hg: parse error: invalid number of arguments: 0
-  [255]
+  [10]
   $ try 'rs(2)'
   (func
     (symbol 'rs')
     (symbol '2'))
   hg: parse error: invalid number of arguments: 1
-  [255]
+  [10]
   $ try 'rs(2, data, 7)'
   (func
     (symbol 'rs')
@@ -1200,7 +1200,7 @@
       (symbol 'data')
       (symbol '7')))
   hg: parse error: invalid number of arguments: 3
-  [255]
+  [10]
   $ try 'rs4(2 or 3, x, x, date)'
   (func
     (symbol 'rs4')
@@ -1575,7 +1575,7 @@
   hg: parse error at 3: syntax error in revset 'foo\\'
   (foo\\
       ^ here)
-  [255]
+  [10]
 
   $ cd ..
 
@@ -1603,7 +1603,7 @@
   $ hg debugrevspec "custom1()"
   *** failed to import extension custompredicate from $TESTTMP/custompredicate.py: intentional failure of loading extension
   hg: parse error: unknown identifier: custom1
-  [255]
+  [10]
 
 Test repo.anyrevs with customized revset overrides
 
--- a/tests/test-template-basic.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-template-basic.t	Mon Nov 16 16:00:50 2020 -0800
@@ -139,7 +139,7 @@
   * keywords: 
   * functions: stringify
   hg: parse error: arithmetic only defined on integers
-  [255]
+  [10]
   $ hg debugtemplate -r0 -v '{-3|stringify}\n'
   (template
     (|
@@ -179,7 +179,7 @@
   * keywords: bar, foo
   * functions: baz
   hg: parse error: can't use a key-value pair in this context
-  [255]
+  [10]
 
   $ hg debugtemplate '{pad("foo", width=10, left=true)}\n'
          foo
@@ -190,7 +190,7 @@
   $ hg debugtemplate '{("not", "an", "argument", "list")|separate}'
   hg: parse error: can't use a list in this context
   (check place of comma and parens)
-  [255]
+  [10]
 
 Second branch starting at nullrev:
 
@@ -307,34 +307,34 @@
   $ echo 'style = t' >> .hg/hgrc
   $ hg log
   hg: parse error at t:3: unmatched quotes
-  [255]
+  [10]
 
   $ hg log -T '{date'
   hg: parse error at 1: unterminated template expansion
   ({date
     ^ here)
-  [255]
+  [10]
   $ hg log -T '{date(}'
   hg: parse error at 6: not a prefix: end
   ({date(}
          ^ here)
-  [255]
+  [10]
   $ hg log -T '{date)}'
   hg: parse error at 5: invalid token
   ({date)}
         ^ here)
-  [255]
+  [10]
   $ hg log -T '{date date}'
   hg: parse error at 6: invalid token
   ({date date}
          ^ here)
-  [255]
+  [10]
 
   $ hg log -T '{}'
   hg: parse error at 1: not a prefix: end
   ({}
     ^ here)
-  [255]
+  [10]
   $ hg debugtemplate -v '{()}'
   (template
     (group
@@ -342,7 +342,7 @@
   * keywords: 
   * functions: 
   hg: parse error: missing argument
-  [255]
+  [10]
 
 Behind the scenes, this would throw TypeError without intype=bytes
 
@@ -356,7 +356,7 @@
   $ hg log -l 3 --template 'line: {desc|shortdate}\n'
   hg: parse error: invalid date: 'Modify, add, remove, rename'
   (template filter 'shortdate' is not compatible with keyword 'desc')
-  [255]
+  [10]
 
 Behind the scenes, this would throw AttributeError without intype=bytes
 
@@ -367,23 +367,23 @@
 
   $ hg log -l 3 --template 'line: {extras|localdate}\n'
   hg: parse error: localdate expects a date information
-  [255]
+  [10]
 
 Behind the scenes, this will throw ValueError
 
   $ hg tip --template '{author|email|date}\n'
   hg: parse error: date expects a date information
-  [255]
+  [10]
 
   $ hg tip -T '{author|email|shortdate}\n'
   hg: parse error: invalid date: 'test'
   (template filter 'shortdate' is not compatible with keyword 'author')
-  [255]
+  [10]
 
   $ hg tip -T '{get(extras, "branch")|shortdate}\n'
   hg: parse error: invalid date: 'default'
   (incompatible use of template filter 'shortdate')
-  [255]
+  [10]
 
 Error in nested template:
 
@@ -391,19 +391,19 @@
   hg: parse error at 2: unterminated string
   ({"date
      ^ here)
-  [255]
+  [10]
 
   $ hg log -T '{"foo{date|?}"}'
   hg: parse error at 11: syntax error
   ({"foo{date|?}"}
               ^ here)
-  [255]
+  [10]
 
 Thrown an error if a template function doesn't exist
 
   $ hg tip --template '{foo()}\n'
   hg: parse error: unknown function 'foo'
-  [255]
+  [10]
 
   $ cd ..
 
@@ -453,13 +453,13 @@
   $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
   hg: parse error: 11 is not iterable of mappings
   (keyword 'rev' does not support map operation)
-  [255]
+  [10]
   $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
   hg: parse error: None is not iterable of mappings
-  [255]
+  [10]
   $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}'
   hg: parse error: list of strings is not mappable
-  [255]
+  [10]
 
 Test new-style inline templating of non-list/dict type:
 
@@ -474,7 +474,7 @@
   branch: default
   $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}'
   hg: parse error: None is not iterable of mappings
-  [255]
+  [10]
   $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}'
   branch: default
   $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}'
@@ -506,7 +506,7 @@
         (symbol 'bar')
         (symbol 'baz')))
     (string '\n'))
-  [255]
+  [10]
   $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null
   (template
     (.
@@ -517,7 +517,7 @@
     (string '\n'))
   * keywords: foo
   * functions: bar
-  [255]
+  [10]
 
 Test evaluation of dot operator:
 
@@ -531,10 +531,10 @@
   $ hg log -R latesttag -l1 -T '{author.invalid}\n'
   hg: parse error: 'test' is not a dictionary
   (keyword 'author' does not support member operation)
-  [255]
+  [10]
   $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n'
   hg: parse error: 'a' is not a dictionary
-  [255]
+  [10]
 
 Test integer literal:
 
@@ -567,10 +567,10 @@
   hg: parse error at 3: not a prefix: )
   ({(-)}\n
       ^ here)
-  [255]
+  [10]
   $ hg debugtemplate '{(-a)}\n'
   hg: parse error: negation needs an integer argument
-  [255]
+  [10]
 
 top-level integer literal is interpreted as symbol (i.e. variable name):
 
@@ -607,10 +607,10 @@
 
   $ hg log -Ra -r0 -T '{desc|1}\n'
   hg: parse error: expected a symbol, got 'integer'
-  [255]
+  [10]
   $ hg log -Ra -r0 -T '{1()}\n'
   hg: parse error: expected a symbol, got 'integer'
-  [255]
+  [10]
 
 Test string literal:
 
@@ -748,13 +748,13 @@
   hg: parse error at 21: unterminated string
   ({if(rev, "{if(rev, \")}")}\n
                         ^ here)
-  [255]
+  [10]
   $ hg log -r 2 -T '{if(rev, \"\\"")}\n'
   hg: parse error: trailing \ in string
-  [255]
+  [10]
   $ hg log -r 2 -T '{if(rev, r\"\\"")}\n'
   hg: parse error: trailing \ in string
-  [255]
+  [10]
 
   $ cd ..
 
@@ -900,7 +900,7 @@
   text.1:wrapped (no-eol)
   $ hg log -l1 -T '{fill(desc, date, "", "")}\n'
   hg: parse error: fill expects an integer width
-  [255]
+  [10]
 
   $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
   {node|short} (no-eol)
@@ -926,16 +926,16 @@
 
   $ hg log -Gv -R a --template '{desc|user()}'
   hg: parse error: expected a symbol, got 'func'
-  [255]
+  [10]
 
 Test broken string escapes:
 
   $ hg log -T "bogus\\" -R a
   hg: parse error: trailing \ in string
-  [255]
+  [10]
   $ hg log -T "\\xy" -R a
   hg: parse error: invalid \x escape* (glob)
-  [255]
+  [10]
 
 Templater supports aliases of symbol and func() styles:
 
--- a/tests/test-template-functions.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-template-functions.t	Mon Nov 16 16:00:50 2020 -0800
@@ -240,7 +240,7 @@
   $ hg log -r null -T '{rev|commondir}'
   hg: parse error: argument is not a list of text
   (template filter 'commondir' is not compatible with keyword 'rev')
-  [255]
+  [10]
 
 Add a dummy commit to make up for the instability of the above:
 
@@ -283,7 +283,7 @@
   $ hg log -l1 -T '{termwidth|count}\n'
   hg: parse error: not countable
   (template filter 'count' is not compatible with keyword 'termwidth')
-  [255]
+  [10]
 
 Upper/lower filters:
 
@@ -478,25 +478,25 @@
 
   $ hg log -R a -r 0 -T '{filter()}\n'
   hg: parse error: filter expects one or two arguments
-  [255]
+  [10]
   $ hg log -R a -r 0 -T '{filter(date)}\n'
   hg: parse error: date is not iterable
-  [255]
+  [10]
   $ hg log -R a -r 0 -T '{filter(rev)}\n'
   hg: parse error: 0 is not iterable
-  [255]
+  [10]
   $ hg log -R a -r 0 -T '{filter(desc|firstline)}\n'
   hg: parse error: 'line 1' is not filterable
-  [255]
+  [10]
   $ hg log -R a -r 0 -T '{filter(manifest)}\n'
   hg: parse error: '0:a0c8bcbbb45c' is not filterable
-  [255]
+  [10]
   $ hg log -R a -r 0 -T '{filter(succsandmarkers)}\n'
   hg: parse error: not filterable without template
-  [255]
+  [10]
   $ hg log -R a -r 0 -T '{filter(desc|splitlines % "{line}", "")}\n'
   hg: parse error: not filterable by expression
-  [255]
+  [10]
 
 Test manifest/get() can be join()-ed as string, though it's silly:
 
@@ -514,7 +514,7 @@
 
   $ hg log -R latesttag -r tip -T '{join(rev, "")}\n'
   hg: parse error: 11 is not iterable
-  [255]
+  [10]
 
 Test min/max of integers
 
@@ -542,47 +542,47 @@
   $ hg debugtemplate '{min(1)}'
   hg: parse error: 1 is not iterable
   (min first argument should be an iterable)
-  [255]
+  [10]
   $ hg debugtemplate '{max(2)}'
   hg: parse error: 2 is not iterable
   (max first argument should be an iterable)
-  [255]
+  [10]
 
   $ hg log -R latesttag -l1 -T '{min(date)}'
   hg: parse error: date is not iterable
   (min first argument should be an iterable)
-  [255]
+  [10]
   $ hg log -R latesttag -l1 -T '{max(date)}'
   hg: parse error: date is not iterable
   (max first argument should be an iterable)
-  [255]
+  [10]
 
 Test min/max of empty sequence:
 
   $ hg debugtemplate '{min("")}'
   hg: parse error: empty string
   (min first argument should be an iterable)
-  [255]
+  [10]
   $ hg debugtemplate '{max("")}'
   hg: parse error: empty string
   (max first argument should be an iterable)
-  [255]
+  [10]
   $ hg debugtemplate '{min(dict())}'
   hg: parse error: empty sequence
   (min first argument should be an iterable)
-  [255]
+  [10]
   $ hg debugtemplate '{max(dict())}'
   hg: parse error: empty sequence
   (max first argument should be an iterable)
-  [255]
+  [10]
   $ hg debugtemplate '{min(dict() % "")}'
   hg: parse error: empty sequence
   (min first argument should be an iterable)
-  [255]
+  [10]
   $ hg debugtemplate '{max(dict() % "")}'
   hg: parse error: empty sequence
   (max first argument should be an iterable)
-  [255]
+  [10]
 
 Test min/max of if() result
 
@@ -606,7 +606,7 @@
   $ hg debugtemplate '{count(0)}'
   hg: parse error: not countable
   (incompatible use of template filter 'count')
-  [255]
+  [10]
   $ hg debugtemplate '{if(true, "", count(0))}'
   $ hg debugtemplate '{if(false, count(0), "")}'
   $ hg debugtemplate '{ifcontains("a", "aa", "", count(0))}'
@@ -654,10 +654,10 @@
 
   $ hg log -R a -r2 -T '{search(r"(?P<0>.)", desc) % "{0}"}\n'
   hg: parse error: search got an invalid pattern: (?P<0>.)
-  [255]
+  [10]
   $ hg log -R a -r2 -T '{search(r"(?P<repo>.)", desc) % "{repo}"}\n'
   hg: parse error: invalid group 'repo' in search pattern: (?P<repo>.)
-  [255]
+  [10]
 
 Test the sub function of templating for expansion:
 
@@ -666,10 +666,10 @@
 
   $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n'
   hg: parse error: sub got an invalid pattern: [
-  [255]
+  [10]
   $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n'
   hg: parse error: sub got an invalid replacement: \1
-  [255]
+  [10]
 
 Test the strip function with chars specified:
 
@@ -721,7 +721,7 @@
 
   $ hg log -R latesttag -T '{date(rev)}\n'
   hg: parse error: date expects a date information
-  [255]
+  [10]
 
 Set up repository containing template fragments in commit metadata:
 
@@ -789,17 +789,17 @@
 
   $ hg log -r 0 -T '{dict(rev, rev=rev)}\n'
   hg: parse error: duplicated dict key 'rev' inferred
-  [255]
+  [10]
   $ hg log -r 0 -T '{dict(node, node|short)}\n'
   hg: parse error: duplicated dict key 'node' inferred
-  [255]
+  [10]
   $ hg log -r 0 -T '{dict(1 + 2)}'
   hg: parse error: dict key cannot be inferred
-  [255]
+  [10]
 
   $ hg log -r 0 -T '{dict(x=rev, x=node)}'
   hg: parse error: dict got multiple values for keyword argument 'x'
-  [255]
+  [10]
 
 Test get function:
 
@@ -810,7 +810,7 @@
   $ hg log -r 0 --template '{get(files, "should_fail")}\n'
   hg: parse error: not a dictionary
   (get() expects a dict as first argument)
-  [255]
+  [10]
 
 Test json filter applied to wrapped object:
 
@@ -836,7 +836,7 @@
   1970-01-01 00:00 +0000
   $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n'
   hg: parse error: localdate expects a timezone
-  [255]
+  [10]
   $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n'
   1970-01-01 02:00 +0200
   $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n'
@@ -845,10 +845,10 @@
   1970-01-01 00:00 +0000
   $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n'
   hg: parse error: localdate expects a timezone
-  [255]
+  [10]
   $ hg log -r0 -T '{localdate(date, date)|isodate}\n'
   hg: parse error: localdate expects a timezone
-  [255]
+  [10]
 
 Test shortest(node) function:
 
@@ -871,7 +871,7 @@
   f7769ec2ab
   $ hg log -r 0 -T '{shortest(node, "not an int")}\n'
   hg: parse error: shortest() expects an integer minlength
-  [255]
+  [10]
 
   $ hg log -r 'wdir()' -T '{node|shortest}\n'
   ffff
@@ -1070,16 +1070,16 @@
   0          test
   $ hg log -r 0 -T '{pad(rev, "not an int")}\n'
   hg: parse error: pad() expects an integer width
-  [255]
+  [10]
 
 Test invalid fillchar passed to pad function
 
   $ hg log -r 0 -T '{pad(rev, 10, "")}\n'
   hg: parse error: pad() expects a single fill character
-  [255]
+  [10]
   $ hg log -r 0 -T '{pad(rev, 10, "--")}\n'
   hg: parse error: pad() expects a single fill character
-  [255]
+  [10]
 
 Test boolean argument passed to pad function
 
@@ -1304,50 +1304,50 @@
 
   $ hg log -T '{revset("%whatever", 0)}\n'
   hg: parse error: unexpected revspec format character w
-  [255]
+  [10]
   $ hg log -T '{revset("%lwhatever", files)}\n'
   hg: parse error: unexpected revspec format character w
-  [255]
+  [10]
   $ hg log -T '{revset("%s %s", 0)}\n'
   hg: parse error: missing argument for revspec
-  [255]
+  [10]
   $ hg log -T '{revset("", 0)}\n'
   hg: parse error: too many revspec arguments specified
-  [255]
+  [10]
   $ hg log -T '{revset("%s", 0, 1)}\n'
   hg: parse error: too many revspec arguments specified
-  [255]
+  [10]
   $ hg log -T '{revset("%", 0)}\n'
   hg: parse error: incomplete revspec format character
-  [255]
+  [10]
   $ hg log -T '{revset("%l", 0)}\n'
   hg: parse error: incomplete revspec format character
-  [255]
+  [10]
   $ hg log -T '{revset("%d", 'foo')}\n'
   hg: parse error: invalid argument for revspec
-  [255]
+  [10]
   $ hg log -T '{revset("%ld", files)}\n'
   hg: parse error: invalid argument for revspec
-  [255]
+  [10]
   $ hg log -T '{revset("%ls", 0)}\n'
   hg: parse error: invalid argument for revspec
-  [255]
+  [10]
   $ hg log -T '{revset("%b", 'foo')}\n'
   hg: parse error: invalid argument for revspec
-  [255]
+  [10]
   $ hg log -T '{revset("%lb", files)}\n'
   hg: parse error: invalid argument for revspec
-  [255]
+  [10]
   $ hg log -T '{revset("%r", 0)}\n'
   hg: parse error: invalid argument for revspec
-  [255]
+  [10]
 
 Invalid operation on revset()
 
   $ hg log -T '{get(revset(":"), "foo")}\n'
   hg: parse error: not a dictionary
   (get() expects a dict as first argument)
-  [255]
+  [10]
 
 Test files function
 
@@ -1432,7 +1432,7 @@
 Test startswith
   $ hg log -Gv -R a --template "{startswith(desc)}"
   hg: parse error: startswith expects two arguments
-  [255]
+  [10]
 
   $ hg log -Gv -R a --template "{startswith('line', desc)}"
   @
@@ -1514,11 +1514,11 @@
 
   $ hg log -Gv -R a --template "{word('0')}"
   hg: parse error: word expects two or three arguments, got 1
-  [255]
+  [10]
 
   $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
   hg: parse error: word expects two or three arguments, got 7
-  [255]
+  [10]
 
 Test word for integer literal
 
@@ -1529,7 +1529,7 @@
 
   $ hg log -Gv -R a --template "{word('a', desc)}"
   hg: parse error: word expects an integer index
-  [255]
+  [10]
 
 Test word for out of range
 
--- a/tests/test-template-graph.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-template-graph.t	Mon Nov 16 16:00:50 2020 -0800
@@ -381,13 +381,13 @@
 
   $ hg log -T '{subsetparents()}\n'
   hg: parse error: subsetparents expects two arguments
-  [255]
+  [10]
   $ hg log -T '{subsetparents("a")}\n'
   hg: parse error: subsetparents expects two arguments
-  [255]
+  [10]
   $ hg log -T '{subsetparents(rev, extras)}\n'
   hg: parse error: subsetparents expects a queried revset
-  [255]
+  [10]
 
   $ cd ..
 
--- a/tests/test-template-map.t	Fri Nov 20 14:43:21 2020 -0800
+++ b/tests/test-template-map.t	Mon Nov 16 16:00:50 2020 -0800
@@ -1242,7 +1242,7 @@
   hg: parse error at 6: not a prefix: )
   (json(-)
          ^ here)
-  [255]
+  [10]
 
 For backward compatibility, the following examples are not parsed as
 function-style references:
@@ -1301,7 +1301,7 @@
   $ echo 'changeset =' > t
   $ hg log --style t
   hg: parse error at t:1: missing value
-  [255]
+  [10]
 
 Error if include fails: