diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_bWVyY3VyaWFsL3NjbXV0aWwucHk=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_bWVyY3VyaWFsL3NjbXV0aWwucHk= 100644
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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
diff --git a/tests/test-annotate.t b/tests/test-annotate.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1hbm5vdGF0ZS50..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1hbm5vdGF0ZS50 100644
--- a/tests/test-annotate.t
+++ b/tests/test-annotate.t
@@ -930,6 +930,6 @@
   $ 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
@@ -934,5 +934,5 @@
   $ 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
@@ -937,5 +937,5 @@
   $ 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
@@ -940,5 +940,5 @@
   $ 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
@@ -943,5 +943,5 @@
   $ 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
@@ -946,5 +946,5 @@
   $ 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
@@ -949,5 +949,5 @@
   $ 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
@@ -952,5 +952,5 @@
   $ 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
@@ -955,5 +955,5 @@
   $ 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
@@ -958,6 +958,6 @@
   $ 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,6 +965,6 @@
   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
@@ -969,6 +969,6 @@
   $ 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
 
diff --git a/tests/test-commit.t b/tests/test-commit.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1jb21taXQudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1jb21taXQudA== 100644
--- a/tests/test-commit.t
+++ b/tests/test-commit.t
@@ -16,6 +16,6 @@
   $ 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'
@@ -20,5 +20,5 @@
   $ 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'
@@ -23,6 +23,6 @@
   $ 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
@@ -26,6 +26,6 @@
   $ 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
@@ -30,6 +30,6 @@
   $ 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,6 +39,6 @@
   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
@@ -43,6 +43,6 @@
   $ 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
 
diff --git a/tests/test-default-push.t b/tests/test-default-push.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1kZWZhdWx0LXB1c2gudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1kZWZhdWx0LXB1c2gudA== 100644
--- a/tests/test-default-push.t
+++ b/tests/test-default-push.t
@@ -137,10 +137,10 @@
   $ 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)
@@ -141,9 +141,9 @@
 
   $ 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 ..
diff --git a/tests/test-diffdir.t b/tests/test-diffdir.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1kaWZmZGlyLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1kaWZmZGlyLnQ= 100644
--- a/tests/test-diffdir.t
+++ b/tests/test-diffdir.t
@@ -34,6 +34,6 @@
 
   $ hg diff -r ""
   hg: parse error: empty query
-  [255]
+  [10]
   $ hg diff -r tip -r ""
   hg: parse error: empty query
@@ -38,6 +38,6 @@
   $ 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.
diff --git a/tests/test-export.t b/tests/test-export.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1leHBvcnQudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1leHBvcnQudA== 100644
--- a/tests/test-export.t
+++ b/tests/test-export.t
@@ -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]
diff --git a/tests/test-extdata.t b/tests/test-extdata.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1leHRkYXRhLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1leHRkYXRhLnQ= 100644
--- a/tests/test-extdata.t
+++ b/tests/test-extdata.t
@@ -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,10 +95,10 @@
 
   $ 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')?)
@@ -99,9 +99,9 @@
   $ 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
@@ -106,6 +106,6 @@
   $ 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
 
diff --git a/tests/test-fileset.t b/tests/test-fileset.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1maWxlc2V0LnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1maWxlc2V0LnQ= 100644
--- a/tests/test-fileset.t
+++ b/tests/test-fileset.t
@@ -81,7 +81,7 @@
   $ fileset 'a_b'
   $ fileset '"\xy"'
   hg: parse error: invalid \x escape* (glob)
-  [255]
+  [10]
 
 Test invalid syntax
 
@@ -90,10 +90,10 @@
     (string 'added')
     None)
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset -v '()()'
   (func
     (group
       None)
     None)
   hg: parse error: not a symbol
@@ -94,11 +94,11 @@
   $ 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
@@ -101,10 +101,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
@@ -106,9 +106,9 @@
   $ 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,7 +117,7 @@
     (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
@@ -121,6 +121,6 @@
 
   $ fileset '"path":.'
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset 'path:foo bar'
   hg: parse error at 9: invalid token
@@ -125,5 +125,5 @@
   $ fileset 'path:foo bar'
   hg: parse error at 9: invalid token
-  [255]
+  [10]
   $ fileset 'foo:bar:baz'
   hg: parse error: not a symbol
@@ -128,5 +128,5 @@
   $ fileset 'foo:bar:baz'
   hg: parse error: not a symbol
-  [255]
+  [10]
   $ fileset 'foo:bar()'
   hg: parse error: pattern must be a string
@@ -131,5 +131,5 @@
   $ fileset 'foo:bar()'
   hg: parse error: pattern must be a string
-  [255]
+  [10]
   $ fileset 'foo:bar'
   hg: parse error: invalid pattern kind: foo
@@ -134,6 +134,6 @@
   $ 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,7 +589,7 @@
   $ 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"')
@@ -593,7 +593,7 @@
   $ 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,6 +1018,6 @@
 
   $ 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
@@ -1022,6 +1022,6 @@
   $ 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,8 +1029,8 @@
   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)
@@ -1033,5 +1033,5 @@
   $ fileset "status('2', ' ', added())"
   hg: parse error at 1: not a prefix: end
   ( 
     ^ here)
-  [255]
+  [10]
diff --git a/tests/test-glog-beautifygraph.t b/tests/test-glog-beautifygraph.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1nbG9nLWJlYXV0aWZ5Z3JhcGgudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1nbG9nLWJlYXV0aWZ5Z3JhcGgudA== 100644
--- a/tests/test-glog-beautifygraph.t
+++ b/tests/test-glog-beautifygraph.t
@@ -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
diff --git a/tests/test-glog.t b/tests/test-glog.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1nbG9nLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1nbG9nLnQ= 100644
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -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
diff --git a/tests/test-grep.t b/tests/test-grep.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1ncmVwLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1ncmVwLnQ= 100644
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -25,6 +25,6 @@
 
   $ 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
@@ -29,5 +29,5 @@
   $ 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)
@@ -32,6 +32,6 @@
   $ hg log -r 'diffcontains("re:**test**")'
   hg: parse error: invalid regular expression: nothing to repeat* (glob)
-  [255]
+  [10]
 
 simple
 
diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1oaXN0ZWRpdC1hcmd1bWVudHMudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1oaXN0ZWRpdC1hcmd1bWVudHMudA== 100644
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -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
 ---------------------------------------
diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1oaXN0ZWRpdC1lZGl0LnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1oaXN0ZWRpdC1lZGl0LnQ= 100644
--- a/tests/test-histedit-edit.t
+++ b/tests/test-histedit-edit.t
@@ -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
   
diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1oaXN0ZWRpdC1mb2xkLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1oaXN0ZWRpdC1mb2xkLnQ= 100644
--- a/tests/test-histedit-fold.t
+++ b/tests/test-histedit-fold.t
@@ -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
   |
diff --git a/tests/test-lfs.t b/tests/test-lfs.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1sZnMudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1sZnMudA== 100644
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -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
diff --git a/tests/test-log-linerange.t b/tests/test-log-linerange.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1sb2ctbGluZXJhbmdlLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1sb2ctbGluZXJhbmdlLnQ= 100644
--- a/tests/test-log-linerange.t
+++ b/tests/test-log-linerange.t
@@ -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.
 
diff --git a/tests/test-log.t b/tests/test-log.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1sb2cudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1sb2cudA== 100644
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -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 ..
 
diff --git a/tests/test-logexchange.t b/tests/test-logexchange.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1sb2dleGNoYW5nZS50..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1sb2dleGNoYW5nZS50 100644
--- a/tests/test-logexchange.t
+++ b/tests/test-logexchange.t
@@ -500,7 +500,7 @@
 
   $ 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
@@ -504,7 +504,7 @@
 
   $ 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
@@ -508,7 +508,7 @@
 
   $ 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
 
diff --git a/tests/test-merge4.t b/tests/test-merge4.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1tZXJnZTQudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1tZXJnZTQudA== 100644
--- a/tests/test-merge4.t
+++ b/tests/test-merge4.t
@@ -29,6 +29,6 @@
 # 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
@@ -33,6 +33,6 @@
   $ 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
diff --git a/tests/test-parse-date.t b/tests/test-parse-date.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1wYXJzZS1kYXRlLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1wYXJzZS1kYXRlLnQ= 100644
--- a/tests/test-parse-date.t
+++ b/tests/test-parse-date.t
@@ -18,6 +18,6 @@
   $ 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
@@ -22,5 +22,5 @@
   $ 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
@@ -25,6 +25,6 @@
   $ 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
 
diff --git a/tests/test-revset-legacy-lookup.t b/tests/test-revset-legacy-lookup.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1yZXZzZXQtbGVnYWN5LWxvb2t1cC50..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1yZXZzZXQtbGVnYWN5LWxvb2t1cC50 100644
--- a/tests/test-revset-legacy-lookup.t
+++ b/tests/test-revset-legacy-lookup.t
@@ -172,6 +172,6 @@
   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
@@ -176,6 +176,6 @@
   $ 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,6 +200,6 @@
   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
@@ -204,6 +204,6 @@
   $ 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,6 +229,6 @@
   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
@@ -233,6 +233,6 @@
   $ 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,8 +261,8 @@
   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)
@@ -265,8 +265,8 @@
   $ 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]
diff --git a/tests/test-revset.t b/tests/test-revset.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1yZXZzZXQudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1yZXZzZXQudA== 100644
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -401,6 +401,6 @@
   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
@@ -405,6 +405,6 @@
   $ log 'date()'
   hg: parse error: date requires a string
-  [255]
+  [10]
   $ log 'date'
   abort: unknown revision 'date'!
   [255]
@@ -412,6 +412,6 @@
   hg: parse error at 5: not a prefix: end
   (date(
         ^ here)
-  [255]
+  [10]
   $ log 'date("\xy")'
   hg: parse error: invalid \x escape* (glob)
@@ -416,5 +416,5 @@
   $ log 'date("\xy")'
   hg: parse error: invalid \x escape* (glob)
-  [255]
+  [10]
   $ log 'date(tip)'
   hg: parse error: invalid date: 'tip'
@@ -419,6 +419,6 @@
   $ 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,6 +459,6 @@
 
   $ 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'
@@ -463,5 +463,5 @@
   $ 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
@@ -466,5 +466,5 @@
   $ 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
@@ -469,5 +469,5 @@
   $ 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'
@@ -472,5 +472,5 @@
   $ 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
@@ -475,5 +475,5 @@
   $ 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
@@ -478,6 +478,6 @@
   $ 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,8 +626,8 @@
   hg: parse error at 0: not a prefix: [
   ([0]
    ^ here)
-  [255]
+  [10]
   $ hg debugrevspec '.#'
   hg: parse error at 2: not a prefix: end
   (.#
      ^ here)
@@ -630,9 +630,9 @@
   $ 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)
@@ -635,9 +635,9 @@
   $ 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)
@@ -640,9 +640,9 @@
   $ 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)
@@ -645,8 +645,8 @@
   $ 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
@@ -650,6 +650,6 @@
 
   $ 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
@@ -654,5 +654,5 @@
   $ 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
@@ -657,9 +657,9 @@
   $ 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?)
@@ -660,10 +660,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
@@ -667,7 +667,7 @@
 
   $ 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,6 +1170,6 @@
 
   $ log 'ancestors(., depth=-1)'
   hg: parse error: negative depth
-  [255]
+  [10]
   $ log 'ancestors(., depth=foo)'
   hg: parse error: ancestors expects an integer depth
@@ -1174,6 +1174,6 @@
   $ log 'ancestors(., depth=foo)'
   hg: parse error: ancestors expects an integer depth
-  [255]
+  [10]
 
 test descendants
 
@@ -1447,6 +1447,6 @@
     (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)
@@ -1451,6 +1451,6 @@
   $ 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,6 +1530,6 @@
   $ 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
@@ -1534,7 +1534,7 @@
   $ 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
@@ -1537,8 +1537,8 @@
   $ 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,6 +2532,6 @@
 
   $ 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'
@@ -2536,6 +2536,6 @@
   $ 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,7 +2980,7 @@
 
   $ 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
@@ -2984,7 +2984,7 @@
 
   $ 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,6 +3052,6 @@
 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
@@ -3056,6 +3056,6 @@
   $ 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,6 +3080,6 @@
   [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
@@ -3084,5 +3084,5 @@
   $ 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
@@ -3087,5 +3087,5 @@
   $ 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
@@ -3090,6 +3090,6 @@
   $ log 'expectsize(0:2, 2:b)'
   hg: parse error: size range bounds must be integers
-  [255]
+  [10]
   $ log 'expectsize(0:2, 2:)'
   0
   1
diff --git a/tests/test-revset2.t b/tests/test-revset2.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC1yZXZzZXQyLnQ=..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC1yZXZzZXQyLnQ= 100644
--- a/tests/test-revset2.t
+++ b/tests/test-revset2.t
@@ -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,7 +568,7 @@
 
   $ 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
@@ -572,9 +572,9 @@
 
   $ log 'ancestors(6) and not "ancestors"(4)'
   hg: parse error: not a symbol
-  [255]
+  [10]
 
 test empty string
 
   $ log ''
   hg: parse error: empty query
@@ -576,8 +576,8 @@
 
 test empty string
 
   $ log ''
   hg: parse error: empty query
-  [255]
+  [10]
   $ log 'parents("")'
   hg: parse error: empty string is not a valid revision
@@ -582,6 +582,6 @@
   $ 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,7 +765,7 @@
   $ 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?)
@@ -769,7 +769,7 @@
   $ 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?)
@@ -773,6 +773,6 @@
   $ 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
@@ -777,8 +777,8 @@
   $ 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?)
@@ -780,10 +780,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
@@ -786,8 +786,8 @@
 
 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,9 +1185,9 @@
     (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
@@ -1189,9 +1189,9 @@
   $ 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
 
diff --git a/tests/test-template-basic.t b/tests/test-template-basic.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC10ZW1wbGF0ZS1iYXNpYy50..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC10ZW1wbGF0ZS1iYXNpYy50 100644
--- a/tests/test-template-basic.t
+++ b/tests/test-template-basic.t
@@ -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,9 +307,9 @@
   $ 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)
@@ -311,10 +311,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)
@@ -317,9 +317,9 @@
   $ 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)
@@ -322,9 +322,9 @@
   $ 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)
@@ -327,10 +327,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)
@@ -332,9 +332,9 @@
 
   $ 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,9 +367,9 @@
 
   $ 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
@@ -371,10 +371,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')
@@ -377,9 +377,9 @@
 
   $ 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')
@@ -382,8 +382,8 @@
 
   $ 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,9 +391,9 @@
   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)
@@ -395,11 +395,11 @@
 
   $ 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'
@@ -401,9 +401,9 @@
 
 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,6 +453,6 @@
   $ 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
@@ -457,5 +457,5 @@
   $ 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
@@ -460,6 +460,6 @@
   $ 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,6 +531,6 @@
   $ 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
@@ -535,6 +535,6 @@
   $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n'
   hg: parse error: 'a' is not a dictionary
-  [255]
+  [10]
 
 Test integer literal:
 
@@ -567,6 +567,6 @@
   hg: parse error at 3: not a prefix: )
   ({(-)}\n
       ^ here)
-  [255]
+  [10]
   $ hg debugtemplate '{(-a)}\n'
   hg: parse error: negation needs an integer argument
@@ -571,6 +571,6 @@
   $ 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,6 +607,6 @@
 
   $ 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'
@@ -611,6 +611,6 @@
   $ hg log -Ra -r0 -T '{1()}\n'
   hg: parse error: expected a symbol, got 'integer'
-  [255]
+  [10]
 
 Test string literal:
 
@@ -748,6 +748,6 @@
   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
@@ -752,5 +752,5 @@
   $ 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
@@ -755,6 +755,6 @@
   $ 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,9 +926,9 @@
 
   $ 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
@@ -930,8 +930,8 @@
 
 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)
@@ -936,6 +936,6 @@
   $ hg log -T "\\xy" -R a
   hg: parse error: invalid \x escape* (glob)
-  [255]
+  [10]
 
 Templater supports aliases of symbol and func() styles:
 
diff --git a/tests/test-template-functions.t b/tests/test-template-functions.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC10ZW1wbGF0ZS1mdW5jdGlvbnMudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC10ZW1wbGF0ZS1mdW5jdGlvbnMudA== 100644
--- a/tests/test-template-functions.t
+++ b/tests/test-template-functions.t
@@ -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,6 +478,6 @@
 
   $ 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
@@ -482,5 +482,5 @@
   $ 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
@@ -485,5 +485,5 @@
   $ 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
@@ -488,5 +488,5 @@
   $ 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
@@ -491,5 +491,5 @@
   $ 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
@@ -494,5 +494,5 @@
   $ 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
@@ -497,6 +497,6 @@
   $ 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,7 +542,7 @@
   $ 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)
@@ -546,8 +546,8 @@
   $ 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)
@@ -550,8 +550,8 @@
 
   $ 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)
@@ -555,10 +555,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)
@@ -559,10 +559,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)
@@ -566,7 +566,7 @@
   $ 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)
@@ -570,7 +570,7 @@
   $ 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)
@@ -574,7 +574,7 @@
   $ 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)
@@ -578,7 +578,7 @@
   $ 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)
@@ -582,7 +582,7 @@
   $ 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,6 +654,6 @@
 
   $ 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>.)
@@ -658,6 +658,6 @@
   $ 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,6 +666,6 @@
 
   $ 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
@@ -670,6 +670,6 @@
   $ 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,6 +789,6 @@
 
   $ 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
@@ -793,5 +793,5 @@
   $ 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
@@ -796,6 +796,6 @@
   $ 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'
@@ -799,7 +799,7 @@
 
   $ 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,6 +845,6 @@
   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
@@ -849,6 +849,6 @@
   $ 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,9 +1070,9 @@
   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
@@ -1074,8 +1074,8 @@
 
 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
@@ -1080,6 +1080,6 @@
   $ 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,6 +1304,6 @@
 
   $ 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
@@ -1308,5 +1308,5 @@
   $ 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
@@ -1311,5 +1311,5 @@
   $ 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
@@ -1314,5 +1314,5 @@
   $ 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
@@ -1317,5 +1317,5 @@
   $ 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
@@ -1320,5 +1320,5 @@
   $ 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
@@ -1323,5 +1323,5 @@
   $ 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
@@ -1326,5 +1326,5 @@
   $ 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
@@ -1329,5 +1329,5 @@
   $ 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
@@ -1332,5 +1332,5 @@
   $ 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
@@ -1335,5 +1335,5 @@
   $ 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
@@ -1338,5 +1338,5 @@
   $ 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
@@ -1341,9 +1341,9 @@
   $ 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)
@@ -1344,10 +1344,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,7 +1514,7 @@
 
   $ 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
@@ -1518,7 +1518,7 @@
 
   $ 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
 
diff --git a/tests/test-template-graph.t b/tests/test-template-graph.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC10ZW1wbGF0ZS1ncmFwaC50..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC10ZW1wbGF0ZS1ncmFwaC50 100644
--- a/tests/test-template-graph.t
+++ b/tests/test-template-graph.t
@@ -381,6 +381,6 @@
 
   $ 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
@@ -385,5 +385,5 @@
   $ 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
@@ -388,6 +388,6 @@
   $ hg log -T '{subsetparents(rev, extras)}\n'
   hg: parse error: subsetparents expects a queried revset
-  [255]
+  [10]
 
   $ cd ..
 
diff --git a/tests/test-template-map.t b/tests/test-template-map.t
index 9dc1351d0b5f304caa282af27f40021f4bcf6981_dGVzdHMvdGVzdC10ZW1wbGF0ZS1tYXAudA==..fc4fb2f17dd4e85eb1660caf9842506576e6f98d_dGVzdHMvdGVzdC10ZW1wbGF0ZS1tYXAudA== 100644
--- a/tests/test-template-map.t
+++ b/tests/test-template-map.t
@@ -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: