Job try-ea5da7abfd67f71258322052ef3d679c6e9a5b6e-debian10-cpython-3.5-0

Repo:try
Node:ea5da7abfd67f71258322052ef3d679c6e9a5b6e
Name:debian10-cpython-3.5
Scheduled At:2019-10-24T01:44:28
Started At:2019-10-24T01:44:38
Finished At:2019-10-24T01:56:15

Failed Tests

test-bookmarks-corner-case.t

--- /hgwork/src/tests/test-bookmarks-corner-case.t
+++ /hgwork/src/tests/test-bookmarks-corner-case.t.err
@@ -201,7 +201,6 @@
   pushing to ssh://user@dummy/bookrace-server
   searching for changes
   remote: setting raced push up
-  remote has heads on branch 'default' that are not known locally: f26c3b5167d1
   remote: adding changesets
   remote: adding manifests
   remote: adding file changes
@@ -220,7 +219,6 @@
   |  summary:     A1
   |
   | o  changeset:   3:f26c3b5167d1
-  | |  bookmark:    book-B
   | |  user:        test
   | |  date:        Thu Jan 01 00:00:00 1970 +0000
   | |  summary:     B1
@@ -243,4 +241,3 @@
   
   $ hg -R bookrace-server book
      book-A                    4:9ce3b28c16de
-     book-B                    3:f26c3b5167d1

test-bookmarks-pushpull.t#b2-binary

test-bookmarks-pushpull.t#b2-pushkey

test-byteify-strings.t

--- /hgwork/src/tests/test-byteify-strings.t
+++ /hgwork/src/tests/test-byteify-strings.t.err
@@ -16,8 +16,23 @@
   > mydict.iteritems()
   > EOF
   $ byteify_strings testfile.py -i
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 334, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
   $ cat testfile.py
-  obj[b'test'] = b"1234"
+  obj['test'] = b"1234"
   mydict.iteritems()
 
 Test with dictiter
@@ -27,8 +42,21 @@
   > mydict.iteritems()
   > EOF
   $ byteify_strings testfile.py --dictiter
-  obj[b'test'] = b"1234"
-  mydict.items()
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 
 Test kwargs-like objects
 
@@ -64,35 +92,21 @@
   > commitopts.setdefault('test', 'testing')
   > EOF
   $ byteify_strings testfile.py --treat-as-kwargs kwargs opts commitopts
-  kwargs['test'] = b"123"
-  kwargs[test[b'testing']]
-  kwargs[test[[[b'testing']]]]
-  kwargs[kwargs['testing']]
-  kwargs.get('test')
-  kwargs.pop('test')
-  kwargs.get('test', b'testing')
-  kwargs.pop('test', b'testing')
-  kwargs.setdefault('test', b'testing')
-  
-  opts['test'] = b"123"
-  opts[test[b'testing']]
-  opts[test[[[b'testing']]]]
-  opts[opts['testing']]
-  opts.get('test')
-  opts.pop('test')
-  opts.get('test', b'testing')
-  opts.pop('test', b'testing')
-  opts.setdefault('test', b'testing')
-  
-  commitopts['test'] = b"123"
-  commitopts[test[b'testing']]
-  commitopts[test[[[b'testing']]]]
-  commitopts[commitopts['testing']]
-  commitopts.get('test')
-  commitopts.pop('test')
-  commitopts.get('test', b'testing')
-  commitopts.pop('test', b'testing')
-  commitopts.setdefault('test', b'testing')
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 
 Test attr*() as methods
 
@@ -111,18 +125,21 @@
   >     pass
   > EOF
   $ byteify_strings testfile.py --allow-attr-methods
-  setattr(o, 'a', 1)
-  util.setattr(o, 'ae', 1)
-  util.getattr(o, 'alksjdf', b'default')
-  util.addattr(o, 'asdf')
-  util.hasattr(o, 'lksjdf', b'default')
-  util.safehasattr(o, 'lksjdf', b'default')
-  @eh.wrapfunction(func, 'lksjdf')
-  def f():
-      pass
-  @eh.wrapclass(klass, 'lksjdf')
-  def f():
-      pass
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 
 Test without attr*() as methods
 
@@ -141,18 +158,21 @@
   >     pass
   > EOF
   $ byteify_strings testfile.py
-  setattr(o, 'a', 1)
-  util.setattr(o, b'ae', 1)
-  util.getattr(o, b'alksjdf', b'default')
-  util.addattr(o, b'asdf')
-  util.hasattr(o, b'lksjdf', b'default')
-  util.safehasattr(o, b'lksjdf', b'default')
-  @eh.wrapfunction(func, b'lksjdf')
-  def f():
-      pass
-  @eh.wrapclass(klass, b'lksjdf')
-  def f():
-      pass
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 
 Test ignore comments
 
@@ -173,20 +193,21 @@
   > 
   > EOF
   $ byteify_strings testfile.py
-  # py3-transform: off
-  "none"
-  "of"
-  'these'
-  s = """should"""
-  d = '''be'''
-  # py3-transform: on
-  b"this should"
-  b'and this also'
-  
-  # no-py3-transform
-  l = "this should be ignored"
-  l2 = b"this shouldn't"
-  
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 Test triple-quoted strings
 
   $ cat > testfile.py <<EOF
@@ -201,15 +222,21 @@
   > '''
   > EOF
   $ byteify_strings testfile.py
-  """This is ignored
-  """
-  
-  line = b"""
-    This should not be
-  """
-  line = b'''
-  Neither should this
-  '''
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 
 Test prefixed strings
 
@@ -218,8 +245,21 @@
   > obj[r'test'] = u"1234"
   > EOF
   $ byteify_strings testfile.py
-  obj[b'test'] = b"1234"
-  obj[r'test'] = u"1234"
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]
 
 Test multi-line alignment
 
@@ -245,22 +285,18 @@
   >  }
   > EOF
   $ byteify_strings testfile.py
-  def foo():
-      error.Abort(_(b"foo"
-                    b"bar"
-                    b"%s")
-                  % parameter)
-  {
-      b'test': dict,
-      b'test2': dict,
-  }
-  [
-     b"thing",
-     b"thing2"
-  ]
-  (
-     b"tuple",
-     b"tuple2",
-  )
-  {b"thing",
-   }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 345, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 338, in main
+      process(fin, fout, opts)
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 264, in process
+      fout.write(tokenize.untokenize(tokens))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 340, in untokenize
+      out = ut.untokenize(iterable)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/tokenize.py", line 249, in untokenize
+      for t in it:
+    File "/hgwork/src/tests/../contrib/byteify-strings.py", line 161, in replacetokens
+      if t.type == token.COMMENT:
+  AttributeError: module 'token' has no attribute 'COMMENT'
+  [1]

test-check-module-imports.t

--- /hgwork/src/tests/test-check-module-imports.t
+++ /hgwork/src/tests/test-check-module-imports.t.err
@@ -38,3 +38,18 @@
   > -X tests/test-imports-checker.t    > -X tests/test-verify-repo-operations.py    > | sed 's-\-/-g' | "$PYTHON" "$import_checker" -
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/import-checker.py", line 813, in <module>
+      sys.exit(int(main(sys.argv)))
+    File "/hgwork/src/tests/../contrib/import-checker.py", line 780, in main
+      for src, modname, name, line in sources(source_path, localmodname):
+    File "/hgwork/src/tests/../contrib/import-checker.py", line 758, in sources
+      for script, modname, t, line in embedded(f, modname, src):
+    File "/hgwork/src/tests/../contrib/import-checker.py", line 728, in embedded
+      for name, starts, ends, code in testparseutil.pyembedded(f, src, errors):
+    File "/hgwork/src/contrib/testparseutil.py", line 186, in embedded
+      for lineno, line in enumerate(lines, 1):
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/encodings/ascii.py", line 26, in decode
+      return codecs.ascii_decode(input, self.errors)[0]
+  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 996: ordinal not in range(128)
+  [1]

test-check-py3-compat.t

--- /hgwork/src/tests/test-check-py3-compat.t
+++ /hgwork/src/tests/test-check-py3-compat.t.err
@@ -40,11 +40,14 @@
   > | sed 's/[0-9][0-9]*)$/*)/'
   hgext/convert/transport.py: error importing: <*Error> No module named 'svn.client' (error at transport.py:*) (glob) (?)
   hgext/infinitepush/sqlindexapi.py: error importing: <*Error> No module named 'mysql' (error at sqlindexapi.py:*) (glob) (?)
-  mercurial/scmwindows.py: error importing: <ValueError> _type_ 'v' not supported (error at win32.py:*) (no-windows !)
-  mercurial/win32.py: error importing: <ValueError> _type_ 'v' not supported (error at win32.py:*) (no-windows !)
-  mercurial/windows.py: error importing: <ModuleNotFoundError> No module named 'msvcrt' (error at windows.py:*) (no-windows !)
+  contrib/grey.py: invalid syntax: invalid syntax (grey.py, line *)
+  hgext/convert/transport.py: error importing: <ImportError> No module named 'svn.client' (error at transport.py:*)
+  hgext/infinitepush/sqlindexapi.py: error importing: <ImportError> No module named 'mysql' (error at sqlindexapi.py:*)
   mercurial/posix.py: error importing: <ModuleNotFoundError> No module named 'fcntl' (error at posix.py:*) (windows !)
   mercurial/scmposix.py: error importing: <ModuleNotFoundError> No module named 'fcntl' (error at scmposix.py:*) (windows !)
+  mercurial/scmwindows.py: error importing: <ValueError> _type_ 'v' not supported (error at win32.py:*)
+  mercurial/win32.py: error importing: <ValueError> _type_ 'v' not supported (error at win32.py:*)
+  mercurial/windows.py: error importing: <ImportError> No module named 'msvcrt' (error at windows.py:*)
 #endif
 
 #if py3 pygments

test-clone-cgi.t

--- /hgwork/src/tests/test-clone-cgi.t
+++ /hgwork/src/tests/test-clone-cgi.t.err
@@ -27,13 +27,198 @@
   $ . "$TESTDIR/cgienv"
   $ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING
   $ "$PYTHON" hgweb.cgi >page1 2>&1
+  [1]
   $ "$PYTHON" "$TESTDIR/md5sum.py" page1
-  1f424bb22ec05c3c6bc866b6e67efe43  page1
+  bba2f81dc80a05f12f104b29b60441ca  page1
 
 make sure headers are sent even when there is no body
 
   $ QUERY_STRING="cmd=listkeys&namespace=nosuchnamespace" "$PYTHON" hgweb.cgi
-  Status: 200 Script output follows
 (esc)
-  Content-Type: application/mercurial-0.1
 (esc)
-  Content-Length: 0
 (esc)
-  
 (esc)
+  <!--: spam
+  Content-Type: text/html
+  
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
+  </font> </font> </font> </script> </object> </blockquote> </pre>
+  </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
+  <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
+  <tr bgcolor="#6622aa">
+  <td valign=bottom>&nbsp;<br>
+  <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  ><td align=right valign=bottom
+  ><font color="#ffffff" face="helvetica, arial">Python 3.5.7: /hgdev/pyenv/versions/3.5.7/bin/python3.5<br>Thu Oct 24 01:55:36 2019</font></td></tr></table>
+      
+  <p>A problem occurred in a Python script.  Here is the sequence of
+  function calls leading up to the error, in the order they occurred.</p>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:/*/$TESTTMP/hgweb.cgi">$TESTTMP/hgweb.cgi</a> in <strong><module></strong>()</td></tr> (glob)
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;4</small>&nbsp;cgitb.enable()<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;5</small>&nbsp;from&nbsp;mercurial&nbsp;import&nbsp;demandimport;&nbsp;demandimport.enable()<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;&nbsp;6</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;hgweb<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;7</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;wsgicgi<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;8</small>&nbsp;application&nbsp;=&nbsp;hgweb(b"test",&nbsp;b"Empty&nbsp;test&nbsp;repository")<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">mercurial <em>undefined</em>, hgweb <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.hgweb', loader=&lt;_froz...ts.bi4ppc_z/install/lib/python/mercurial/hgweb']), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;import&nbsp;os<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;from&nbsp;..i18n&nbsp;import&nbsp;_<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;15</small>&nbsp;from&nbsp;..&nbsp;import&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">_ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.i18n', loader=&lt;_froze...s.bi4ppc_z/install/lib/python/mercurial/i18n.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;113</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;114</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;115</small>&nbsp;if&nbsp;_plain():<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;=&nbsp;lambda&nbsp;message:&nbsp;message<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;else:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>_plain</strong>&nbsp;= &lt;function _plain&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong>_plain</strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;105</small>&nbsp;def&nbsp;_plain():<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;106</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;107</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b'HGPLAIN'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;108</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;b'HGPLAINEXCEPT'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;109</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;):<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>encoding</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, encoding.environ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, attr='environ')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.encoding', loader=&lt;_f...4ppc_z/install/lib/python/mercurial/encoding.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;21</small>&nbsp;from&nbsp;.pure&nbsp;import&nbsp;charencode&nbsp;as&nbsp;charencodepure<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;22</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;23</small>&nbsp;charencode&nbsp;=&nbsp;policy.importmod(r'charencode')<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;24</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;25</small>&nbsp;isasciistr&nbsp;=&nbsp;charencode.isasciistr<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">charencode <em>undefined</em>, <strong>policy</strong>&nbsp;= &lt;module 'mercurial.policy' from '/hgwork/tmp/hgt...bi4ppc_z/install/lib/python/mercurial/policy.py'&gt;, policy.<strong>importmod</strong>&nbsp;= &lt;function importmod&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>importmod</strong>(modname='charencode')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod&nbsp;=&nbsp;_importfrom(pn,&nbsp;mn)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;pn&nbsp;==&nbsp;verpkg:<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;118</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_checkmod(pn,&nbsp;mn,&nbsp;mod)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;119</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;mod<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>_checkmod</strong>&nbsp;= &lt;function _checkmod&gt;, <strong>pn</strong>&nbsp;= 'cext', <strong>mn</strong>&nbsp;= 'parsers', <strong>mod</strong>&nbsp;= &lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>_checkmod</strong>(pkgname='cext', modname='parsers', mod=&lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;)</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;100</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'cannot&nbsp;import&nbsp;module&nbsp;%s.%s&nbsp;'<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;101</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'(expected&nbsp;version:&nbsp;%d,&nbsp;actual:&nbsp;%r)'<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;102</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;(pkgname,&nbsp;modname,&nbsp;expected,&nbsp;actual)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;103</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;104</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
+  ('cannot import module cext.parsers (expected version: 13, actual: None)',)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>msg&nbsp;=
+  'cannot import module cext.parsers (expected version: 13, actual: None)'
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>name&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>path&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>with_traceback&nbsp;=
+  &lt;built-in method with_traceback of ImportError object&gt;
+  
+  
+  <!-- The above is a description of an error in a Python program, formatted
+       for a Web browser because the 'cgitb' module was enabled.  In case you
+       are not reading this in a Web browser, here is the original traceback:
+  
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 6, in &lt;module&gt;
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in &lt;module&gt;
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in &lt;module&gt;
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in &lt;module&gt;
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  
+  -->
+  
+  [1]

test-contrib.t

--- /hgwork/src/tests/test-contrib.t
+++ /hgwork/src/tests/test-contrib.t.err
@@ -15,19 +15,52 @@
 changing local directly
 
   $ "$PYTHON" simplemerge local base other && echo "merge succeeded"
-  merge succeeded
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
   $ cat local
   local
   base
-  other
   $ cp orig local
 
 printing to stdout
 
   $ "$PYTHON" simplemerge -p local base other
-  local
-  base
-  other
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 local:
 
@@ -44,132 +77,231 @@
   $ echo end >> conflict-other
 
   $ "$PYTHON" simplemerge -p conflict-local base conflict-other
-  base
-  <<<<<<< conflict-local
-  not other
-  =======
-  other
-  >>>>>>> conflict-other
-  end
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   [1]
 
 1 label
 
   $ "$PYTHON" simplemerge -p -L foo conflict-local base conflict-other
-  base
-  <<<<<<< foo
-  not other
-  =======
-  other
-  >>>>>>> conflict-other
-  end
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   [1]
 
 2 labels
 
   $ "$PYTHON" simplemerge -p -L foo -L bar conflict-local base conflict-other
-  base
-  <<<<<<< foo
-  not other
-  =======
-  other
-  >>>>>>> bar
-  end
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   [1]
 
 3 labels
 
   $ "$PYTHON" simplemerge -p -L foo -L bar -L base conflict-local base conflict-other
-  base
-  <<<<<<< foo
-  not other
-  end
-  ||||||| base
-  =======
-  other
-  end
-  >>>>>>> bar
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   [1]
 
 too many labels
 
   $ "$PYTHON" simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other
-  abort: can only specify three labels.
-  [255]
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 binary file
 
   $ "$PYTHON" -c "f = open('binary-local', 'w'); f.write(''); f.close()"
   $ cat orig >> binary-local
   $ "$PYTHON" simplemerge -p binary-local base other
-  warning: binary-local looks like a binary file.
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   [1]
 
 binary file --text
 
   $ "$PYTHON" simplemerge -a -p binary-local base other 2>&1
-  warning: binary-local looks like a binary file.
-  local (esc)
-  base
-  other
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 help
 
   $ "$PYTHON" simplemerge --help
-  simplemerge [OPTS] LOCAL BASE OTHER
-  
-      Simple three-way file merge utility with a minimal feature set.
-  
-      Apply to LOCAL the changes necessary to go from BASE to OTHER.
-  
-      By default, LOCAL is overwritten with the results of this operation.
-  
-  options:
-   -L --label       labels to use on conflict markers
-   -a --text        treat all files as text
-   -p --print       print results instead of overwriting LOCAL
-      --no-minimal  no effect (DEPRECATED)
-   -h --help        display help and exit
-   -q --quiet       suppress output
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 wrong number of arguments
 
   $ "$PYTHON" simplemerge
-  simplemerge: wrong number of arguments
-  simplemerge [OPTS] LOCAL BASE OTHER
-  
-      Simple three-way file merge utility with a minimal feature set.
-  
-      Apply to LOCAL the changes necessary to go from BASE to OTHER.
-  
-      By default, LOCAL is overwritten with the results of this operation.
-  
-  options:
-   -L --label       labels to use on conflict markers
-   -a --text        treat all files as text
-   -p --print       print results instead of overwriting LOCAL
-      --no-minimal  no effect (DEPRECATED)
-   -h --help        display help and exit
-   -q --quiet       suppress output
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   [1]
 
 bad option
 
   $ "$PYTHON" simplemerge --foo -p local base other
-  simplemerge: option --foo not recognized
-  simplemerge [OPTS] LOCAL BASE OTHER
-  
-      Simple three-way file merge utility with a minimal feature set.
-  
-      Apply to LOCAL the changes necessary to go from BASE to OTHER.
-  
-      By default, LOCAL is overwritten with the results of this operation.
-  
-  options:
-   -L --label       labels to use on conflict markers
-   -a --text        treat all files as text
-   -p --print       print results instead of overwriting LOCAL
-      --no-minimal  no effect (DEPRECATED)
-   -h --help        display help and exit
-   -q --quiet       suppress output
-  [1]
+  Traceback (most recent call last):
+    File "simplemerge", line 10, in <module>
+      from mercurial.i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]

test-convert-tla.t

--- /hgwork/src/tests/test-convert-tla.t
+++ /hgwork/src/tests/test-convert-tla.t.err
@@ -96,15 +96,8 @@
   $ hg convert tla-repo tla-repo-hg
   initializing destination tla-repo-hg repository
   analyzing tree version tla@mercurial--convert/tla--test--0...
-  scanning source...
-  sorting...
-  converting...
-  5 initial import
-  4 added a file, src and src/b (binary)
-  3 added link to a and modify a
-  2 added second link and modify b
-  1 file to link and link to file test
-  0 move and rename a-link-2 file and src directory
+  abort: could not parse cat-log of tla@mercurial--convert/tla--test--0--patch-5
+  [255]
   $ tla register-archive -d tla@mercurial--convert
   $ glog()
   > {
@@ -114,21 +107,5 @@
 show graph log
 
   $ glog -R tla-repo-hg
-  o  5 "move and rename a-link-2 file and src directory" files: c src/a-link src/a-link-2 src/b test/a-link test/b
-  |
-  o  4 "file to link and link to file test" files: src/a-link-2 src/b
-  |
-  o  3 "added second link and modify b" files: src/a-link-2 src/b
-  |
-  o  2 "added link to a and modify a" files: a src/a-link
-  |
-  o  1 "added a file, src and src/b (binary)" files: a src/b
-  |
-  o  0 "initial import" files:
-  
   $ hg up -q -R tla-repo-hg
   $ hg -R tla-repo-hg manifest --debug
-  c4072c4b72e1cabace081888efa148ee80ca3cbb 644   a
-  0201ac32a3a8e86e303dff60366382a54b48a72e 644   c
-  c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link
-  375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b

test-demandimport.py

--- /hgwork/src/tests/test-demandimport.py.out
+++ /hgwork/src/tests/test-demandimport.py.err
@@ -0,0 +1,21 @@
+Traceback (most recent call last):
+  File "/hgwork/src/tests/test-demandimport.py", line 119, in <module>
+    assert f(procutil) == "<module 'mercurial.utils.procutil' from '?'>", f(
+  File "/hgwork/src/tests/test-demandimport.py", line 53, in f
+    l = repr(obj)
+  File "<frozen importlib._bootstrap>", line 274, in _module_repr
+  File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+    self.__spec__.loader.exec_module(self)
+  File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/utils/procutil.py", line 22, in <module>
+    from ..i18n import _
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 16, in <module>
+    from . import (
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+    charencode = policy.importmod(r'charencode')
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+    _checkmod(pn, mn, mod)
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+    % (pkgname, modname, expected, actual)
+ImportError: cannot import module cext.parsers (expected version: 13, actual: None)

test-extension.t

--- /hgwork/src/tests/test-extension.t
+++ /hgwork/src/tests/test-extension.t.err
@@ -222,18 +222,29 @@
 
   $ PATH_INFO='/' SCRIPT_NAME='' "$PYTHON" hgweb.cgi    >    | grep '^[0-9]) ' # ignores HTML output
-  1) foo imported
-  1) bar imported
-  2) foo uisetup
-  2) bar uisetup
-  3) foo extsetup
-  3) bar extsetup
-  4) foo uipopulate
-  4) bar uipopulate
-  4) foo uipopulate
-  4) bar uipopulate
-  5) foo reposetup
-  5) bar reposetup
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 3, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 (check that revset predicate foo() and bar() are available)
 
@@ -245,7 +256,29 @@
   $ export PATH_INFO
   $ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' "$PYTHON" hgweb.cgi    >     | grep '<a href="/rev/[0-9a-z]*">'
-     <a href="/rev/c24b9ac61126">add file</a>
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 3, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
   $ echo 'foo = !' >> $HGRCPATH
   $ echo 'bar = !' >> $HGRCPATH
@@ -576,23 +609,16 @@
 Examine module importing.
 
   $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute)
-  LIB: this is extlibroot.lsub1.lsub2.used
-  LIB: this is extlibroot.lsub1.lsub2.called.func()
-  LIB: this is extlibroot.recursedown.abs.used
-  LIB: this is extlibroot.recursedown.legacy.used
-  LIB: this is extlibroot.shadowing.used
-  ABS: this is absextroot.xsub1.xsub2.used
-  ABS: this is absextroot.xsub1.xsub2.called.func()
+  *** failed to import extension absextroot from $TESTTMP/absextroot: extlibroot.lsub1.lsub2.unused is loaded unintentionally
+  hg: unknown command 'showabsolute'
+  (use 'hg help' for a list of commands)
+  [255]
 
   $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative)
-  LIB: this is extlibroot.lsub1.lsub2.used
-  LIB: this is extlibroot.lsub1.lsub2.called.func()
-  LIB: this is extlibroot.recursedown.abs.used
-  LIB: this is extlibroot.recursedown.legacy.used
-  LIB: this is extlibroot.shadowing.used
-  REL: this is absextroot.xsub1.xsub2.used
-  REL: this is absextroot.xsub1.xsub2.called.func()
-  REL: this relimporter imports 'this is absextroot.relimportee'
+  *** failed to import extension absextroot from $TESTTMP/absextroot: extlibroot.lsub1.lsub2.unused is loaded unintentionally
+  hg: unknown command 'showrelative'
+  (did you mean shelve?)
+  [255]
 
 Examine whether sub-module is imported relatively as expected.
 

test-fix-metadata.t

--- /hgwork/src/tests/test-fix-metadata.t
+++ /hgwork/src/tests/test-fix-metadata.t.err
@@ -75,21 +75,54 @@
   $ hg add -q
 
   $ hg fix -w
-  ignored invalid output from fixer tool: invalid
-  fixed metadatafalse in revision 2147483647 using metadatafalse
-  ignored invalid output from fixer tool: missing
-  fixed valid in revision 2147483647 using valid
-  saw "key" 1 times
-  fixed 1 files with valid
-  fixed the working copy
+  ** unknown exception encountered, please report by visiting
+  ** https://mercurial-scm.org/wiki/BugTracker
+  ** Python 3.5.7 (default, Oct 22 2019, 02:37:13) [GCC 8.3.0]
+  ** Mercurial Distributed SCM (version 5.2rc0+30-ea5da7abfd67)
+  ** Extensions loaded: fix
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/bin/hg", line 36, in <module>
+      dispatch.run()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 111, in run
+      status = dispatch(req)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 250, in dispatch
+      ret = _runcatch(req) or 0
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 424, in _runcatch
+      return _callcatch(ui, _runcatchfunc)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 433, in _callcatch
+      return scmutil.callcatch(ui, func)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/scmutil.py", line 177, in callcatch
+      return func()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 414, in _runcatchfunc
+      return _dispatch(req)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1174, in _dispatch
+      lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 862, in runcommand
+      ret = _runcommand(ui, options, cmd, d)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1185, in _runcommand
+      return cmdfunc()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1171, in <lambda>
+      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/util.py", line 1843, in check
+      return func(*args, **kwargs)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fix.py", line 302, in fix
+      for rev, path, filerevmetadata, newdata in results:
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fix.py", line 273, in getfixes
+      ui, repo, opts, fixers, ctx, path, basectxs[rev]
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fix.py", line 645, in fixfile
+      metadata[fixername] = json.loads(metadatajson)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
   $ cat metadatafalse
-  new content
+  old content
   $ cat missing
   old content
   $ cat invalid
   old content
   $ cat valid
-  new content
+  old content
 
   $ cd ..

test-gendoc-da.t

--- /hgwork/src/tests/test-gendoc-da.t
+++ /hgwork/src/tests/test-gendoc-da.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc da
-  checking for parse errors
+  [1]

test-gendoc-de.t

--- /hgwork/src/tests/test-gendoc-de.t
+++ /hgwork/src/tests/test-gendoc-de.t.err
@@ -1,6 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc de
-  checking for parse errors
-  Die Dateien werden dem Projektarchiv beim nächsten Übernehmen (commit) hinzugefügt. Um dies vorher rückgängig zu machen, siehe:hg:`forget`. (esc)
-  warning: please have a space before :hg:
+  [1]

test-gendoc-el.t

--- /hgwork/src/tests/test-gendoc-el.t
+++ /hgwork/src/tests/test-gendoc-el.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc el
-  checking for parse errors
+  [1]

test-gendoc-fr.t

--- /hgwork/src/tests/test-gendoc-fr.t
+++ /hgwork/src/tests/test-gendoc-fr.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc fr
-  checking for parse errors
+  [1]

test-gendoc-it.t

--- /hgwork/src/tests/test-gendoc-it.t
+++ /hgwork/src/tests/test-gendoc-it.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc it
-  checking for parse errors
+  [1]

test-gendoc-ja.t

--- /hgwork/src/tests/test-gendoc-ja.t
+++ /hgwork/src/tests/test-gendoc-ja.t.err
@@ -1,6 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc ja
-  checking for parse errors
-  複製/改名に関する履歴保存のために git 差分形式を使用(-g/--git 指定や 設定ファイルでの [diff] git=1 記述)するのであれば、 add/remove/copy/rename といった hg のコマンドによる履歴記録も、 通常と変わりなく機能します。 git 差分形式の詳細に関しては、 'help diffs' を参照してください。 (esc)
-  warning: please use " instead of ' for hg ... "..."
+  [1]

test-gendoc-pt_BR.t

--- /hgwork/src/tests/test-gendoc-pt_BR.t
+++ /hgwork/src/tests/test-gendoc-pt_BR.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc pt_BR
-  checking for parse errors
+  [1]

test-gendoc-ro.t

--- /hgwork/src/tests/test-gendoc-ro.t
+++ /hgwork/src/tests/test-gendoc-ro.t.err
@@ -4,6 +4,4 @@
 moving pager to core. These two warnings about references are expected
 until the localization is corrected.
   $ $TESTDIR/check-gendoc ro
-  checking for parse errors
-  gendoc.txt:58: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
-  gendoc.txt:58: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
+  [1]

test-gendoc-ru.t

--- /hgwork/src/tests/test-gendoc-ru.t
+++ /hgwork/src/tests/test-gendoc-ru.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc ru
-  checking for parse errors
+  [1]

test-gendoc-sv.t

--- /hgwork/src/tests/test-gendoc-sv.t
+++ /hgwork/src/tests/test-gendoc-sv.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc sv
-  checking for parse errors
+  [1]

test-gendoc-zh_CN.t

--- /hgwork/src/tests/test-gendoc-zh_CN.t
+++ /hgwork/src/tests/test-gendoc-zh_CN.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc zh_CN
-  checking for parse errors
+  [1]

test-gendoc-zh_TW.t

--- /hgwork/src/tests/test-gendoc-zh_TW.t
+++ /hgwork/src/tests/test-gendoc-zh_TW.t.err
@@ -1,4 +1,4 @@
 #require docutils gettext
 
   $ $TESTDIR/check-gendoc zh_TW
-  checking for parse errors
+  [1]

test-gendoc.t

--- /hgwork/src/tests/test-gendoc.t
+++ /hgwork/src/tests/test-gendoc.t.err
@@ -18,15 +18,3 @@
   >     fi
   > done; true
   % extracting documentation from C
-  % extracting documentation from da
-  % extracting documentation from de
-  % extracting documentation from el
-  % extracting documentation from fr
-  % extracting documentation from it
-  % extracting documentation from ja
-  % extracting documentation from pt_BR
-  % extracting documentation from ro
-  % extracting documentation from ru
-  % extracting documentation from sv
-  % extracting documentation from zh_CN
-  % extracting documentation from zh_TW

test-hgweb-annotate-whitespace.t

--- /hgwork/src/tests/test-hgweb-annotate-whitespace.t
+++ /hgwork/src/tests/test-hgweb-annotate-whitespace.t.err
@@ -85,704 +85,102 @@
   $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 4 (intra whitespace on line 0)",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "08adbe269f24cf22d975eadeec16790c5b22f558",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 2 (leading whitespace on line 2)",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 3 (trailing whitespace on line 3)",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "dcb62cfbfc9b3ab995a5cbbaff6e1971c3e4f865",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 annotate.ignorews=1 config option is honored
 
   $ get-with-headers.py --json $LOCALIP:$HGPORT1 'json-annotate/9d1b2c7db017/foo'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 ignorews=1 query string argument enables whitespace skipping
 
   $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignorews=1'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 ignorews=0 query string argument disables when config defaults to enabled
 
   $ get-with-headers.py --json $LOCALIP:$HGPORT1 'json-annotate/9d1b2c7db017/foo?ignorews=0'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 4 (intra whitespace on line 0)",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "08adbe269f24cf22d975eadeec16790c5b22f558",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 2 (leading whitespace on line 2)",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 3 (trailing whitespace on line 3)",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "dcb62cfbfc9b3ab995a5cbbaff6e1971c3e4f865",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 ignorewsamount=1 query string enables whitespace amount skipping
 
   $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignorewsamount=1'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 2 (leading whitespace on line 2)",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 ignorewseol=1 query string enables whitespace end of line skipping
 
   $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignorewseol=1'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 4 (intra whitespace on line 0)",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "08adbe269f24cf22d975eadeec16790c5b22f558",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 2 (leading whitespace on line 2)",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 0",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 ignoreblanklines=1 query string enables whitespace blank line skipping
 
   $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignoreblanklines=1'
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 4 (intra whitespace on line 0)",
-        "line": "line  0
",
-        "lineno": 1,
-        "node": "08adbe269f24cf22d975eadeec16790c5b22f558",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 5 (add blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 2,
-        "node": "400ef1d404706cfb48afd2b78ce6addf641ced25",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 6 (add another blank line between line 0 and 1)",
-        "line": "
",
-        "lineno": 3,
-        "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 1",
-        "line": "line 1 modified by 1
",
-        "lineno": 4,
-        "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 2
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 2 (leading whitespace on line 2)",
-        "line": "    line 2
",
-        "lineno": 5,
-        "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 3
-      },
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "commit 3 (trailing whitespace on line 3)",
-        "line": "line 3    
",
-        "lineno": 6,
-        "node": "dcb62cfbfc9b3ab995a5cbbaff6e1971c3e4f865",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 4
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "commit 6 (add another blank line between line 0 and 1)",
-    "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5",
-    "parents": [
-      "400ef1d404706cfb48afd2b78ce6addf641ced25"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]

test-hgweb-auth.py

--- /hgwork/src/tests/test-hgweb-auth.py.out
+++ /hgwork/src/tests/test-hgweb-auth.py.err
@@ -1,217 +1,14 @@
-
-*** Test in-uri schemes
-
-CFG: {b'x.prefix': b'http://example.org'}
-URI: http://example.org/foo
-     ('x', 'x')
-URI: http://example.org/foo/bar
-     ('x', 'x')
-URI: http://example.org/bar
-     ('x', 'x')
-URI: https://example.org/foo
-     abort
-URI: https://example.org/foo/bar
-     abort
-URI: https://example.org/bar
-     abort
-URI: https://x@example.org/bar
-     abort
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'https://example.org'}
-URI: http://example.org/foo
-     abort
-URI: http://example.org/foo/bar
-     abort
-URI: http://example.org/bar
-     abort
-URI: https://example.org/foo
-     ('x', 'x')
-URI: https://example.org/foo/bar
-     ('x', 'x')
-URI: https://example.org/bar
-     ('x', 'x')
-URI: https://x@example.org/bar
-     ('x', 'x')
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'http://example.org', b'x.schemes': b'https'}
-URI: http://example.org/foo
-     ('x', 'x')
-URI: http://example.org/foo/bar
-     ('x', 'x')
-URI: http://example.org/bar
-     ('x', 'x')
-URI: https://example.org/foo
-     abort
-URI: https://example.org/foo/bar
-     abort
-URI: https://example.org/bar
-     abort
-URI: https://x@example.org/bar
-     abort
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'https://example.org', b'x.schemes': b'http'}
-URI: http://example.org/foo
-     abort
-URI: http://example.org/foo/bar
-     abort
-URI: http://example.org/bar
-     abort
-URI: https://example.org/foo
-     ('x', 'x')
-URI: https://example.org/foo/bar
-     ('x', 'x')
-URI: https://example.org/bar
-     ('x', 'x')
-URI: https://x@example.org/bar
-     ('x', 'x')
-URI: https://y@example.org/bar
-     abort
-
-*** Test separately configured schemes
-
-CFG: {b'x.prefix': b'example.org', b'x.schemes': b'http'}
-URI: http://example.org/foo
-     ('x', 'x')
-URI: http://example.org/foo/bar
-     ('x', 'x')
-URI: http://example.org/bar
-     ('x', 'x')
-URI: https://example.org/foo
-     abort
-URI: https://example.org/foo/bar
-     abort
-URI: https://example.org/bar
-     abort
-URI: https://x@example.org/bar
-     abort
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'example.org', b'x.schemes': b'https'}
-URI: http://example.org/foo
-     abort
-URI: http://example.org/foo/bar
-     abort
-URI: http://example.org/bar
-     abort
-URI: https://example.org/foo
-     ('x', 'x')
-URI: https://example.org/foo/bar
-     ('x', 'x')
-URI: https://example.org/bar
-     ('x', 'x')
-URI: https://x@example.org/bar
-     ('x', 'x')
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'example.org', b'x.schemes': b'http https'}
-URI: http://example.org/foo
-     ('x', 'x')
-URI: http://example.org/foo/bar
-     ('x', 'x')
-URI: http://example.org/bar
-     ('x', 'x')
-URI: https://example.org/foo
-     ('x', 'x')
-URI: https://example.org/foo/bar
-     ('x', 'x')
-URI: https://example.org/bar
-     ('x', 'x')
-URI: https://x@example.org/bar
-     ('x', 'x')
-URI: https://y@example.org/bar
-     abort
-
-*** Test prefix matching
-
-CFG: {b'x.prefix': b'http://example.org/foo', b'y.prefix': b'http://example.org/bar'}
-URI: http://example.org/foo
-     ('x', 'x')
-URI: http://example.org/foo/bar
-     ('x', 'x')
-URI: http://example.org/bar
-     ('y', 'y')
-URI: https://example.org/foo
-     abort
-URI: https://example.org/foo/bar
-     abort
-URI: https://example.org/bar
-     abort
-URI: https://x@example.org/bar
-     abort
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'http://example.org/foo', b'y.prefix': b'http://example.org/foo/bar'}
-URI: http://example.org/foo
-     ('x', 'x')
-URI: http://example.org/foo/bar
-     ('y', 'y')
-URI: http://example.org/bar
-     abort
-URI: https://example.org/foo
-     abort
-URI: https://example.org/foo/bar
-     abort
-URI: https://example.org/bar
-     abort
-URI: https://x@example.org/bar
-     abort
-URI: https://y@example.org/bar
-     abort
-CFG: {b'x.prefix': b'*', b'y.prefix': b'https://example.org/bar'}
-URI: http://example.org/foo
-     abort
-URI: http://example.org/foo/bar
-     abort
-URI: http://example.org/bar
-     abort
-URI: https://example.org/foo
-     ('x', 'x')
-URI: https://example.org/foo/bar
-     ('x', 'x')
-URI: https://example.org/bar
-     ('y', 'y')
-URI: https://x@example.org/bar
-     ('x', 'x')
-URI: https://y@example.org/bar
-     ('y', 'y')
-
-*** Test user matching
-
-CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo', b'x.username': None}
-URI: http://y@example.org/foo
-     ('y', 'xpassword')
-CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://example.org/foo', b'y.username': b'y'}
-URI: http://y@example.org/foo
-     ('y', 'ypassword')
-CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo/bar', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://example.org/foo', b'y.username': b'y'}
-URI: http://y@example.org/foo/bar
-     ('y', 'xpassword')
-
-*** Test user matching with name in prefix
-
-CFG: {b'x.password': b'xpassword', b'x.prefix': b'https://example.org/foo', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo', b'y.username': b'y'}
-URI: http://y@example.org/foo
-     ('y', 'ypassword')
-CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://z@example.org/foo', b'y.username': b'y'}
-URI: http://y@example.org/foo
-     abort
-CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://z@example.org/foo'}
-URI: http://y@example.org/foo
-     abort
-CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo', b'y.username': b'z'}
-URI: http://y@example.org/foo
-     abort
-CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo'}
-URI: http://y@example.org/foo
-     ('y', 'ypassword')
-CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo'}
-URI: http://example.org/foo
-     abort
-
-*** Test urllib2 and util.url
-
-URIs: http://user@example.com:8080/foo http://example.com:8080/foo
-('user', '')
+Traceback (most recent call last):
+  File "/hgwork/src/tests/test-hgweb-auth.py", line 15, in <module>
+    urlerr = util.urlerr
+  File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+    self.__spec__.loader.exec_module(self)
+  File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/util.py", line 62, in <module>
+    base85 = policy.importmod(r'base85')
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+    _checkmod(pn, mn, mod)
+  File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+    % (pkgname, modname, expected, actual)
+ImportError: cannot import module cext.base85 (expected version: 1, actual: None)

test-hgweb-commands.t

--- /hgwork/src/tests/test-hgweb-commands.t
+++ /hgwork/src/tests/test-hgweb-commands.t.err
@@ -2283,35 +2283,120 @@
   $ PATH_INFO=/bookmarks; export PATH_INFO
   $ QUERY_STRING='style=raw'
   $ "$PYTHON" hgweb.cgi | grep -v ETag:
-  Status: 200 Script output follows
 (esc)
-  Content-Type: text/plain; charset=ascii
 (esc)
-  
 (esc)
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 listbookmarks hides secret bookmarks
 
   $ PATH_INFO=/; export PATH_INFO
   $ QUERY_STRING='cmd=listkeys&namespace=bookmarks'
   $ "$PYTHON" hgweb.cgi
-  Status: 200 Script output follows
 (esc)
-  Content-Type: application/mercurial-0.1
 (esc)
-  Content-Length: 0
 (esc)
-  
 (esc)
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 search works with filtering
 
   $ PATH_INFO=/log; export PATH_INFO
   $ QUERY_STRING='rev=babar'
   $ "$PYTHON" hgweb.cgi > search
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
   $ grep Status search
-  Status: 200 Script output follows
 (esc)
+  [1]
 
 summary works with filtering (issue3810)
 
   $ PATH_INFO=/summary; export PATH_INFO
   $ QUERY_STRING='style=monoblue'; export QUERY_STRING
   $ "$PYTHON" hgweb.cgi > summary.out
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
   $ grep "^Status" summary.out
-  Status: 200 Script output follows
 (esc)
+  [1]
 
 proper status for filtered revision
 
@@ -2321,12 +2406,29 @@
   $ PATH_INFO=/rev/5; export PATH_INFO
   $ QUERY_STRING='style=raw'
   $ "$PYTHON" hgweb.cgi #> search
-  Status: 404 Not Found
 (esc)
-  ETag: W/"*"
 (glob) (esc)
-  Content-Type: text/plain; charset=ascii
 (esc)
-  
 (esc)
-  
-  error: filtered revision '5' (not in 'served' subset)
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 
 
@@ -2335,12 +2437,29 @@
   $ PATH_INFO=/rev/4; export PATH_INFO
   $ QUERY_STRING='style=raw'
   $ "$PYTHON" hgweb.cgi #> search
-  Status: 404 Not Found
 (esc)
-  ETag: W/"*"
 (glob) (esc)
-  Content-Type: text/plain; charset=ascii
 (esc)
-  
 (esc)
-  
-  error: filtered revision '4' (not in 'served' subset)
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 filtered '0' changeset
 
@@ -2363,76 +2482,55 @@
   $ PATH_INFO=/graph/; export PATH_INFO
   $ QUERY_STRING=''
   $ "$PYTHON" hgweb.cgi | grep Status
-  Status: 200 Script output follows
 (esc)
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 (check rendered revision)
   $ QUERY_STRING='style=raw'
   $ "$PYTHON" hgweb.cgi | grep -v ETag
-  Status: 200 Script output follows
 (esc)
-  Content-Type: text/plain; charset=ascii
 (esc)
-  
 (esc)
-  
-  # HG graph
-  # Node ID 1d9b947fef1fbb382a95c11a8f5a67e9a10b5026
-  # Rows shown 7
-  
-  changeset:   1d9b947fef1f
-  user:        test
-  date:        1970-01-01
-  summary:     5
-  branch:      default
-  tag:         tip
-  
-  node:        (0, 0) (color 1)
-  edge:        (0, 0) -> (0, 1) (color 1)
-  
-  changeset:   0cfd435fd222
-  user:        test
-  date:        1970-01-01
-  summary:     4
-  
-  node:        (0, 1) (color 1)
-  edge:        (0, 1) -> (0, 2) (color 1)
-  
-  changeset:   6768b9939e82
-  user:        test
-  date:        1970-01-01
-  summary:     3
-  
-  node:        (0, 2) (color 1)
-  edge:        (0, 2) -> (0, 3) (color 1)
-  
-  changeset:   05b0497fd125
-  user:        test
-  date:        1970-01-01
-  summary:     2
-  
-  node:        (0, 3) (color 1)
-  edge:        (0, 3) -> (0, 4) (color 1)
-  
-  changeset:   9c102df67cfb
-  user:        test
-  date:        1970-01-01
-  summary:     1
-  
-  node:        (0, 4) (color 1)
-  edge:        (0, 4) -> (0, 5) (color 1)
-  
-  changeset:   3ebcd7db11bf
-  user:        test
-  date:        1970-01-01
-  summary:     0
-  
-  node:        (0, 5) (color 1)
-  edge:        (0, 5) -> (0, 6) (color 1)
-  
-  changeset:   c5e9bd96ae01
-  user:        test
-  date:        1970-01-01
-  summary:     Babar is in the jungle!
-  
-  node:        (0, 6) (color 1)
-  
-  
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 #endif
 
 

test-hgweb-json.t

--- /hgwork/src/tests/test-hgweb-json.t
+++ /hgwork/src/tests/test-hgweb-json.t.err
@@ -116,1396 +116,311 @@
   $ request json-file/78896eb0e102/foo-new
   200 Script output follows
   
-  {
-    "bookmarks": [],
-    "branch": "default",
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "move foo",
-    "lines": [
-      {
-        "line": "bar
"
-      }
-    ],
-    "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-    "parents": [
-      "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-    ],
-    "path": "foo-new",
-    "phase": "public",
-    "tags": [
-      "tag1"
-    ],
-    "user": "test"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 file/{revision} shows root directory info
 
   $ request json-file/cc725e08502a
   200 Script output follows
   
-  {
-    "abspath": "/",
-    "bookmarks": [],
-    "directories": [
-      {
-        "abspath": "/da",
-        "basename": "da",
-        "emptydirs": ""
-      }
-    ],
-    "files": [
-      {
-        "abspath": ".hgtags",
-        "basename": ".hgtags",
-        "date": [
-          0.0,
-          0
-        ],
-        "flags": "",
-        "size": 92
-      },
-      {
-        "abspath": "foo-new",
-        "basename": "foo-new",
-        "date": [
-          0.0,
-          0
-        ],
-        "flags": "",
-        "size": 4
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-    "tags": [
-      "tip"
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 changelog/ shows information about several changesets
 
   $ request json-changelog
   200 Script output follows
   
-  {
-    "changeset_count": 10,
-    "changesets": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "merge test-branch into default",
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "parents": [
-          "ceed296fe500c3fac9541e31dad860cb49c89e45",
-          "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tip"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit in test-branch",
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "parents": [
-          "6ab967a8ab3489227a83f80e920faa039a71819f"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create test branch",
-        "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark2"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag2",
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
-        "parents": [
-          "f2890a05fea49bfaf9fb27ed5490894eba32da78"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit to da/foo",
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "parents": [
-          "93a8ce14f89156426b7fa981af8042da53f03aa0"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tag2"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag",
-        "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
-        "parents": [
-          "78896eb0e102174ce9278438a95e12543e4367a7"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "move foo",
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "parents": [
-          "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-        ],
-        "phase": "public",
-        "tags": [
-          "tag1"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark1"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify da/foo",
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-        "parents": [
-          "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 changelog/{revision} shows information starting at a specific changeset
 
   $ request json-changelog/f8bbb9024b10
   200 Script output follows
   
-  {
-    "changeset_count": 10,
-    "changesets": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 shortlog/ shows information about a set of changesets
 
   $ request json-shortlog
   200 Script output follows
   
-  {
-    "changeset_count": 10,
-    "changesets": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "merge test-branch into default",
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "parents": [
-          "ceed296fe500c3fac9541e31dad860cb49c89e45",
-          "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tip"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit in test-branch",
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "parents": [
-          "6ab967a8ab3489227a83f80e920faa039a71819f"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create test branch",
-        "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark2"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag2",
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
-        "parents": [
-          "f2890a05fea49bfaf9fb27ed5490894eba32da78"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit to da/foo",
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "parents": [
-          "93a8ce14f89156426b7fa981af8042da53f03aa0"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tag2"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag",
-        "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
-        "parents": [
-          "78896eb0e102174ce9278438a95e12543e4367a7"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "move foo",
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "parents": [
-          "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-        ],
-        "phase": "public",
-        "tags": [
-          "tag1"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark1"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify da/foo",
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-        "parents": [
-          "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 shortlog is displayed by default (issue5978)
 
   $ request '?style=json'
   200 Script output follows
   
-  {
-    "changeset_count": 10,
-    "changesets": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "merge test-branch into default",
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "parents": [
-          "ceed296fe500c3fac9541e31dad860cb49c89e45",
-          "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tip"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit in test-branch",
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "parents": [
-          "6ab967a8ab3489227a83f80e920faa039a71819f"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create test branch",
-        "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark2"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag2",
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
-        "parents": [
-          "f2890a05fea49bfaf9fb27ed5490894eba32da78"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit to da/foo",
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "parents": [
-          "93a8ce14f89156426b7fa981af8042da53f03aa0"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tag2"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag",
-        "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
-        "parents": [
-          "78896eb0e102174ce9278438a95e12543e4367a7"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "move foo",
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "parents": [
-          "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-        ],
-        "phase": "public",
-        "tags": [
-          "tag1"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark1"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify da/foo",
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-        "parents": [
-          "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 changeset/ renders the tip changeset
 
   $ request json-rev
   200 Script output follows
   
-  {
-    "bookmarks": [],
-    "branch": "default",
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "merge test-branch into default",
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-    "parents": [
-      "ceed296fe500c3fac9541e31dad860cb49c89e45",
-      "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
-    ],
-    "phase": "draft",
-    "tags": [
-      "tip"
-    ],
-    "user": "test"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 changeset/{revision} shows tags
 
   $ request json-rev/78896eb0e102
   200 Script output follows
   
-  {
-    "bookmarks": [],
-    "branch": "default",
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "move foo",
-    "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-    "parents": [
-      "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-    ],
-    "phase": "public",
-    "tags": [
-      "tag1"
-    ],
-    "user": "test"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 changeset/{revision} shows bookmarks
 
   $ request json-rev/8d7c456572ac
   200 Script output follows
   
-  {
-    "bookmarks": [
-      "bookmark1"
-    ],
-    "branch": "default",
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "modify da/foo",
-    "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-    "parents": [
-      "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-    ],
-    "phase": "public",
-    "tags": [],
-    "user": "test"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 changeset/{revision} shows branches
 
   $ request json-rev/6ab967a8ab34
   200 Script output follows
   
-  {
-    "bookmarks": [],
-    "branch": "test-branch",
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "create test branch",
-    "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-    "parents": [
-      "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-    ],
-    "phase": "draft",
-    "tags": [],
-    "user": "test"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 manifest/{revision}/{path} shows info about a directory at a revision
 
   $ request json-manifest/06e557f3edf6/
   200 Script output follows
   
-  {
-    "abspath": "/",
-    "bookmarks": [],
-    "directories": [
-      {
-        "abspath": "/da",
-        "basename": "da",
-        "emptydirs": ""
-      }
-    ],
-    "files": [
-      {
-        "abspath": "foo",
-        "basename": "foo",
-        "date": [
-          0.0,
-          0
-        ],
-        "flags": "",
-        "size": 4
-      }
-    ],
-    "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-    "tags": []
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 tags/ shows tags info
 
   $ request json-tags
   200 Script output follows
   
-  {
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-    "tags": [
-      {
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "tag": "tag2"
-      },
-      {
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "tag": "tag1"
-      }
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 bookmarks/ shows bookmarks info
 
   $ request json-bookmarks
   200 Script output follows
   
-  {
-    "bookmarks": [
-      {
-        "bookmark": "bookmark2",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
-      },
-      {
-        "bookmark": "bookmark1",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 branches/ shows branches info
 
   $ request json-branches
   200 Script output follows
   
-  {
-    "branches": [
-      {
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "status": "open"
-      },
-      {
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "status": "inactive"
-      }
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 summary/ shows a summary of repository state
 
   $ request json-summary
   200 Script output follows
   
-  {
-    "archives": [
-      {
-        "extension": ".tar.bz2",
-        "node": "tip",
-        "type": "bz2",
-        "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
-      }
-    ],
-    "bookmarks": [
-      {
-        "bookmark": "bookmark2",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
-      },
-      {
-        "bookmark": "bookmark1",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-      }
-    ],
-    "branches": [
-      {
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "status": "open"
-      },
-      {
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "status": "inactive"
-      }
-    ],
-    "labels": [],
-    "lastchange": [
-      0.0,
-      0
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-    "shortlog": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "merge test-branch into default",
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "parents": [
-          "ceed296fe500c3fac9541e31dad860cb49c89e45",
-          "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tip"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit in test-branch",
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "parents": [
-          "6ab967a8ab3489227a83f80e920faa039a71819f"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create test branch",
-        "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark2"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag2",
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
-        "parents": [
-          "f2890a05fea49bfaf9fb27ed5490894eba32da78"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit to da/foo",
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "parents": [
-          "93a8ce14f89156426b7fa981af8042da53f03aa0"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tag2"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag",
-        "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
-        "parents": [
-          "78896eb0e102174ce9278438a95e12543e4367a7"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "move foo",
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "parents": [
-          "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-        ],
-        "phase": "public",
-        "tags": [
-          "tag1"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark1"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify da/foo",
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-        "parents": [
-          "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "tags": [
-      {
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "tag": "tag2"
-      },
-      {
-        "date": [
-          0.0,
-          0
-        ],
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "tag": "tag1"
-      }
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
   $ request json-changelog?rev=create
   200 Script output follows
   
-  {
-    "entries": [
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create test branch",
-        "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark2"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag2",
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
-        "parents": [
-          "f2890a05fea49bfaf9fb27ed5490894eba32da78"
-        ],
-        "phase": "draft",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag",
-        "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
-        "parents": [
-          "78896eb0e102174ce9278438a95e12543e4367a7"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-    "query": "create"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 filediff/{revision}/{path} shows changes to a file in a revision
 
   $ request json-diff/f8bbb9024b10/foo
   200 Script output follows
   
-  {
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "modify foo",
-    "diff": [
-      {
-        "blockno": 1,
-        "lines": [
-          {
-            "l": "--- a/foo	Thu Jan 01 00:00:00 1970 +0000
",
-            "n": 1,
-            "t": "-"
-          },
-          {
-            "l": "+++ b/foo	Thu Jan 01 00:00:00 1970 +0000
",
-            "n": 2,
-            "t": "+"
-          },
-          {
-            "l": "@@ -1,1 +1,1 @@
",
-            "n": 3,
-            "t": "@"
-          },
-          {
-            "l": "-foo
",
-            "n": 4,
-            "t": "-"
-          },
-          {
-            "l": "+bar
",
-            "n": 5,
-            "t": "+"
-          }
-        ]
-      }
-    ],
-    "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-    "parents": [
-      "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-    ],
-    "path": "foo"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 comparison/{revision}/{path} shows information about before and after for a file
 
   $ request json-comparison/f8bbb9024b10/foo
   200 Script output follows
   
-  {
-    "author": "test",
-    "children": [],
-    "comparison": [
-      {
-        "lines": [
-          {
-            "ll": "foo",
-            "ln": 1,
-            "rl": "bar",
-            "rn": 1,
-            "t": "replace"
-          }
-        ]
-      }
-    ],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "modify foo",
-    "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-    "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-    "parents": [
-      "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-    ],
-    "path": "foo",
-    "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 annotate/{revision}/{path} shows annotations for each line
 
   $ request json-annotate/f8bbb9024b10/foo
   200 Script output follows
   
-  {
-    "abspath": "foo",
-    "annotate": [
-      {
-        "abspath": "foo",
-        "author": "test",
-        "desc": "modify foo",
-        "line": "bar
",
-        "lineno": 1,
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "revdate": [
-          0.0,
-          0
-        ],
-        "targetline": 1
-      }
-    ],
-    "author": "test",
-    "children": [],
-    "date": [
-      0.0,
-      0
-    ],
-    "desc": "modify foo",
-    "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-    "parents": [
-      "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-    ],
-    "permissions": ""
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 filelog/{revision}/{path} shows history of a single file
 
   $ request json-filelog/f8bbb9024b10/foo
   200 Script output follows
   
-  {
-    "entries": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
   $ request json-filelog/cc725e08502a/da/foo
   200 Script output follows
   
-  {
-    "entries": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit to da/foo",
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "parents": [
-          "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-        ],
-        "phase": "draft",
-        "tags": [
-          "tag2"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark1"
-        ],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify da/foo",
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "tags": [],
-        "user": "test"
-      }
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 (archive/ doesn't use templating, so ignore it)
 
@@ -1516,697 +431,59 @@
   $ request json-graph
   200 Script output follows
   
-  {
-    "changeset_count": 10,
-    "changesets": [
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "merge test-branch into default",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
-        "parents": [
-          "ceed296fe500c3fac9541e31dad860cb49c89e45",
-          "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
-        ],
-        "phase": "draft",
-        "row": 0,
-        "tags": [
-          "tip"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "col": 1,
-        "color": 2,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit in test-branch",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
-        "parents": [
-          "6ab967a8ab3489227a83f80e920faa039a71819f"
-        ],
-        "phase": "draft",
-        "row": 1,
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "test-branch",
-        "col": 1,
-        "color": 2,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create test branch",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "draft",
-        "row": 2,
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark2"
-        ],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag2",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
-        "parents": [
-          "f2890a05fea49bfaf9fb27ed5490894eba32da78"
-        ],
-        "phase": "draft",
-        "row": 3,
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "another commit to da/foo",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
-        "parents": [
-          "93a8ce14f89156426b7fa981af8042da53f03aa0"
-        ],
-        "phase": "draft",
-        "row": 4,
-        "tags": [
-          "tag2"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "create tag",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
-        "parents": [
-          "78896eb0e102174ce9278438a95e12543e4367a7"
-        ],
-        "phase": "public",
-        "row": 5,
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "move foo",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "78896eb0e102174ce9278438a95e12543e4367a7",
-        "parents": [
-          "8d7c456572acf3557e8ed8a07286b10c408bcec5"
-        ],
-        "phase": "public",
-        "row": 6,
-        "tags": [
-          "tag1"
-        ],
-        "user": "test"
-      },
-      {
-        "bookmarks": [
-          "bookmark1"
-        ],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify da/foo",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 1,
-            "width": -1
-          }
-        ],
-        "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
-        "parents": [
-          "f8bbb9024b10f93cdbb8d940337398291d40dea8"
-        ],
-        "phase": "public",
-        "row": 7,
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "col": 0,
-        "color": 1,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "modify foo",
-        "edges": [
-          {
-            "bcolor": "",
-            "col": 0,
-            "color": 1,
-            "nextcol": 0,
-            "width": -1
-          },
-          {
-            "bcolor": "",
-            "col": 1,
-            "color": 2,
-            "nextcol": 0,
-            "width": -1
-          }
-        ],
-        "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
-        "parents": [
-          "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
-        ],
-        "phase": "public",
-        "row": 8,
-        "tags": [],
-        "user": "test"
-      },
-      {
-        "bookmarks": [],
-        "branch": "default",
-        "col": 0,
-        "color": 2,
-        "date": [
-          0.0,
-          0
-        ],
-        "desc": "initial",
-        "edges": [],
-        "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
-        "parents": [],
-        "phase": "public",
-        "row": 9,
-        "tags": [],
-        "user": "test"
-      }
-    ],
-    "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 help/ shows help topics
 
   $ request json-help
   200 Script output follows
   
-  {
-    "earlycommands": [
-      {
-        "summary": "abort an unfinished operation (EXPERIMENTAL)",
-        "topic": "abort"
-      },
-      {
-        "summary": "add the specified files on the next commit",
-        "topic": "add"
-      },
-      {
-        "summary": "show changeset information by line for each file",
-        "topic": "annotate"
-      },
-      {
-        "summary": "make a copy of an existing repository",
-        "topic": "clone"
-      },
-      {
-        "summary": "commit the specified files or all outstanding changes",
-        "topic": "commit"
-      },
-      {
-        "summary": "resumes an interrupted operation (EXPERIMENTAL)",
-        "topic": "continue"
-      },
-      {
-        "summary": "diff repository (or selected files)",
-        "topic": "diff"
-      },
-      {
-        "summary": "dump the header and diffs for one or more changesets",
-        "topic": "export"
-      },
-      {
-        "summary": "forget the specified files on the next commit",
-        "topic": "forget"
-      },
-      {
-        "summary": "create a new repository in the given directory",
-        "topic": "init"
-      },
-      {
-        "summary": "show revision history of entire repository or files",
-        "topic": "log"
-      },
-      {
-        "summary": "merge another revision into working directory",
-        "topic": "merge"
-      },
-      {
-        "summary": "pull changes from the specified source",
-        "topic": "pull"
-      },
-      {
-        "summary": "push changes to the specified destination",
-        "topic": "push"
-      },
-      {
-        "summary": "remove the specified files on the next commit",
-        "topic": "remove"
-      },
-      {
-        "summary": "start stand-alone webserver",
-        "topic": "serve"
-      },
-      {
-        "summary": "show changed files in the working directory",
-        "topic": "status"
-      },
-      {
-        "summary": "summarize working directory state",
-        "topic": "summary"
-      },
-      {
-        "summary": "update working directory (or switch revisions)",
-        "topic": "update"
-      }
-    ],
-    "othercommands": [
-      {
-        "summary": "add all new files, delete all missing files",
-        "topic": "addremove"
-      },
-      {
-        "summary": "create an unversioned archive of a repository revision",
-        "topic": "archive"
-      },
-      {
-        "summary": "reverse effect of earlier changeset",
-        "topic": "backout"
-      },
-      {
-        "summary": "subdivision search of changesets",
-        "topic": "bisect"
-      },
-      {
-        "summary": "create a new bookmark or list existing bookmarks",
-        "topic": "bookmarks"
-      },
-      {
-        "summary": "set or show the current branch name",
-        "topic": "branch"
-      },
-      {
-        "summary": "list repository named branches",
-        "topic": "branches"
-      },
-      {
-        "summary": "create a bundle file",
-        "topic": "bundle"
-      },
-      {
-        "summary": "output the current or given revision of files",
-        "topic": "cat"
-      },
-      {
-        "summary": "show combined config settings from all hgrc files",
-        "topic": "config"
-      },
-      {
-        "summary": "mark files as copied for the next commit",
-        "topic": "copy"
-      },
-      {
-        "summary": "list tracked files",
-        "topic": "files"
-      },
-      {
-        "summary": "copy changes from other branches onto the current branch",
-        "topic": "graft"
-      },
-      {
-        "summary": "search for a pattern in specified files",
-        "topic": "grep"
-      },
-      {
-        "summary": "show branch heads",
-        "topic": "heads"
-      },
-      {
-        "summary": "show help for a given topic or a help overview",
-        "topic": "help"
-      },
-      {
-        "summary": "identify the working directory or specified revision",
-        "topic": "identify"
-      },
-      {
-        "summary": "import an ordered set of patches",
-        "topic": "import"
-      },
-      {
-        "summary": "show new changesets found in source",
-        "topic": "incoming"
-      },
-      {
-        "summary": "output the current or given revision of the project manifest",
-        "topic": "manifest"
-      },
-      {
-        "summary": "show changesets not found in the destination",
-        "topic": "outgoing"
-      },
-      {
-        "summary": "show aliases for remote repositories",
-        "topic": "paths"
-      },
-      {
-        "summary": "set or show the current phase name",
-        "topic": "phase"
-      },
-      {
-        "summary": "roll back an interrupted transaction",
-        "topic": "recover"
-      },
-      {
-        "summary": "rename files; equivalent of copy + remove",
-        "topic": "rename"
-      },
-      {
-        "summary": "redo merges or set/view the merge status of files",
-        "topic": "resolve"
-      },
-      {
-        "summary": "restore files to their checkout state",
-        "topic": "revert"
-      },
-      {
-        "summary": "print the root (top) of the current working directory",
-        "topic": "root"
-      },
-      {
-        "summary": "save and set aside changes from the working directory",
-        "topic": "shelve"
-      },
-      {
-        "summary": "add one or more tags for the current or given revision",
-        "topic": "tag"
-      },
-      {
-        "summary": "list repository tags",
-        "topic": "tags"
-      },
-      {
-        "summary": "apply one or more bundle files",
-        "topic": "unbundle"
-      },
-      {
-        "summary": "restore a shelved change to the working directory",
-        "topic": "unshelve"
-      },
-      {
-        "summary": "verify the integrity of the repository",
-        "topic": "verify"
-      },
-      {
-        "summary": "output version and copyright information",
-        "topic": "version"
-      }
-    ],
-    "topics": [
-      {
-        "summary": "Bundle File Formats",
-        "topic": "bundlespec"
-      },
-      {
-        "summary": "Colorizing Outputs",
-        "topic": "color"
-      },
-      {
-        "summary": "Configuration Files",
-        "topic": "config"
-      },
-      {
-        "summary": "Date Formats",
-        "topic": "dates"
-      },
-      {
-        "summary": "Deprecated Features",
-        "topic": "deprecated"
-      },
-      {
-        "summary": "Diff Formats",
-        "topic": "diffs"
-      },
-      {
-        "summary": "Environment Variables",
-        "topic": "environment"
-      },
-      {
-        "summary": "Using Additional Features",
-        "topic": "extensions"
-      },
-      {
-        "summary": "Specifying File Sets",
-        "topic": "filesets"
-      },
-      {
-        "summary": "Command-line flags",
-        "topic": "flags"
-      },
-      {
-        "summary": "Glossary",
-        "topic": "glossary"
-      },
-      {
-        "summary": "Syntax for Mercurial Ignore Files",
-        "topic": "hgignore"
-      },
-      {
-        "summary": "Configuring hgweb",
-        "topic": "hgweb"
-      },
-      {
-        "summary": "Technical implementation topics",
-        "topic": "internals"
-      },
-      {
-        "summary": "Merge Tools",
-        "topic": "merge-tools"
-      },
-      {
-        "summary": "Pager Support",
-        "topic": "pager"
-      },
-      {
-        "summary": "File Name Patterns",
-        "topic": "patterns"
-      },
-      {
-        "summary": "Working with Phases",
-        "topic": "phases"
-      },
-      {
-        "summary": "Specifying Revisions",
-        "topic": "revisions"
-      },
-      {
-        "summary": "Using Mercurial from scripts and automation",
-        "topic": "scripting"
-      },
-      {
-        "summary": "Subrepositories",
-        "topic": "subrepos"
-      },
-      {
-        "summary": "Template Usage",
-        "topic": "templating"
-      },
-      {
-        "summary": "URL Paths",
-        "topic": "urls"
-      }
-    ]
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 help/{topic} shows an individual help topic
 
   $ request json-help/phases
   200 Script output follows
   
-  {
-    "rawdoc": "Working with Phases
*", (glob)
-    "topic": "phases"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]
 
 Error page shouldn't crash
 
   $ request json-changeset/deadbeef
   404 Not Found
   
-  {
-    "error": "unknown revision 'deadbeef'"
-  }
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
   [1]
 
 Commit message with Japanese Kanji 'Noh', which ends with '\'
@@ -2232,5 +509,12 @@
 Test json escape of multibyte characters
 
   $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
-        "desc": "commit with null character: ",
-        "desc": "能",
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/get-with-headers.py", line 118, in <module>
+      status = request(args.host, args.path, args.show)
+    File "/hgwork/src/tests/get-with-headers.py", line 101, in request
+      data = json.loads(data)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  [1]

test-highlight.t

--- /hgwork/src/tests/test-highlight.t
+++ /hgwork/src/tests/test-highlight.t.err
@@ -967,6 +967,10 @@
   $ hg init eucjp
   $ cd eucjp
   $ "$PYTHON" -c 'print("µþ")' >> eucjp.txt  # Japanese kanji "Kyo"
+  Traceback (most recent call last):
+    File "<string>", line 1, in <module>
+  UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
+  [1]
   $ hg ci -Ama
   adding eucjp.txt
   $ hgserveget () {

test-http-bad-server.t

--- /hgwork/src/tests/test-http-bad-server.t
+++ /hgwork/src/tests/test-http-bad-server.t.err
@@ -697,20 +697,20 @@
   write(20 from 20) -> (235) Content-Length: 42
 (no-py3 !)
   write(2 from 2) -> (233) 
 (no-py3 !)
   write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
; (no-py3 !)
-  readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1

-  readline(*) -> (27) Accept-Encoding: identity
 (glob)
-  readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1
 (glob)
-  readline(*) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks
 (glob)
-  readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
 (glob)
-  readline(*) -> (35) accept: application/mercurial-0.1
 (glob)
-  readline(*) -> (2?) host: localhost:$HGPORT
 (glob)
-  readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)
 (glob)
-  readline(*) -> (2) 
 (glob)
+  write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
;
   sendall(167 from 167) -> (24) HTTP/1.1 200 Script output follows
Server: badhttpserver
Date: $HTTP_DATE$
Content-Type: application/mercurial-0.2
Transfer-Encoding: chunked

 (py36 !)
   sendall(6 from 6) -> (18) 1\r\n\r\n (esc) (py36 !)
   sendall(9 from 9) -> (9) 4
none
 (py36 !)
   sendall(9 from 9) -> (0) 4
HG20
 (py36 !)
-  write(167 from 167) -> (24) HTTP/1.1 200 Script output follows
Server: badhttpserver
Date: $HTTP_DATE$
Content-Type: application/mercurial-0.2
Transfer-Encoding: chunked

 (py3 no-py36 !)
+  readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1

+  readline(*) -> (27) Accept-Encoding: identity
 (glob)
+  readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1
 (glob)
+  readline(*) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks
 (glob)
+  readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
 (glob)
+  readline(*) -> (35) accept: application/mercurial-0.1
 (glob)
+  readline(*) -> (2?) host: localhost:$HGPORT
 (glob)
+  readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)
 (glob)
+  readline(*) -> (2) 
 (glob)
   write(36 from 36) -> (155) HTTP/1.1 200 Script output follows
 (no-py3 !)
   write(23 from 23) -> (132) Server: badhttpserver
 (no-py3 !)
   write(37 from 37) -> (95) Date: $HTTP_DATE$
 (no-py3 !)
@@ -720,12 +720,17 @@
   write(6 from 6) -> (18) 1\r\n\r\n (esc) (no-py3 !)
   write(9 from 9) -> (9) 4
none
 (no-py3 !)
   write(9 from 9) -> (0) 4
HG20
 (no-py3 !)
-  write limit reached; closing socket
-  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
-  Traceback (most recent call last):
-  Exception: connection closed after sending N bytes
-  
+  write(167 from 167) -> (24) HTTP/1.1 200 Script output follows
Server: badhttpserver
Date: $HTTP_DATE$
Content-Type: application/mercurial-0.2
Transfer-Encoding: chunked


+  write(6 from 6) -> (18) 1\r\n\r\n (esc)
+  write(9 from 9) -> (9) 4
none

+  write(9 from 9) -> (0) 4
HG20

   write(27) -> 15
Internal Server Error
 (no-py3 !)
+  write limit reached; closing socket
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
+  Traceback (most recent call last):
+  Exception: connection closed after sending N bytes
+  
+  write(27) -> 15
Internal Server Error

 
   $ rm -f error.log
 

test-install.t

--- /hgwork/src/tests/test-install.t
+++ /hgwork/src/tests/test-install.t.err
@@ -155,12 +155,132 @@
 
 debuginstall extension support
   $ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false | grep atchman
+  ** unknown exception encountered, please report by visiting
+  ** https://mercurial-scm.org/wiki/BugTracker
+  ** Python 3.5.7 (default, Oct 22 2019, 02:37:13) [GCC 8.3.0]
+  ** Mercurial Distributed SCM (version 5.2rc0+30-ea5da7abfd67)
+  ** Extensions loaded: fsmonitor
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 97, in _command
+      return self._watchmanclient.query(*watchmanargs)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/pywatchman/__init__.py", line 996, in query
+      self._connect()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/pywatchman/__init__.py", line 863, in _connect
+      self.sockpath = self._resolvesockname()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/pywatchman/__init__.py", line 848, in _resolvesockname
+      raise WatchmanError("watchman exited with code %d" % exitcode)
+  hgext.fsmonitor.pywatchman.WatchmanError: watchman exited with code 1
+  
+  During handling of the above exception, another exception occurred:
+  
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/__init__.py", line 188, in debuginstall
+      v = c.command(b"version")
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 108, in command
+      return self._command(*args)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 103, in _command
+      raise Unavailable(str(ex))
+  hgext.fsmonitor.watchmanclient.Unavailable: <exception str() failed>
+  
+  During handling of the above exception, another exception occurred:
+  
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/bin/hg", line 36, in <module>
+      dispatch.run()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 111, in run
+      status = dispatch(req)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 250, in dispatch
+      ret = _runcatch(req) or 0
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 424, in _runcatch
+      return _callcatch(ui, _runcatchfunc)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 433, in _callcatch
+      return scmutil.callcatch(ui, func)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/scmutil.py", line 177, in callcatch
+      return func()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 414, in _runcatchfunc
+      return _dispatch(req)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1174, in _dispatch
+      lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 862, in runcommand
+      ret = _runcommand(ui, options, cmd, d)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1185, in _runcommand
+      return cmdfunc()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1171, in <lambda>
+      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/util.py", line 1843, in check
+      return func(*args, **kwargs)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/debugcommands.py", line 1696, in debuginstall
+      problems += handler(ui, fm)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/__init__.py", line 195, in debuginstall
+      err = str(e)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 27, in __str__
+      return b'warning: Watchman unavailable: %s' % self.msg
+  TypeError: %b requires bytes, or an object that implements __bytes__, not 'str'
   fsmonitor checking for watchman binary... (false)
-   watchman binary missing or broken: warning: Watchman unavailable: watchman exited with code 1
 Verify the json works too:
   $ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false -Tjson | grep atchman
-    "fsmonitor-watchman": "false",
-    "fsmonitor-watchman-error": "warning: Watchman unavailable: watchman exited with code 1",
+  ** unknown exception encountered, please report by visiting
+  ** https://mercurial-scm.org/wiki/BugTracker
+  ** Python 3.5.7 (default, Oct 22 2019, 02:37:13) [GCC 8.3.0]
+  ** Mercurial Distributed SCM (version 5.2rc0+30-ea5da7abfd67)
+  ** Extensions loaded: fsmonitor
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 97, in _command
+      return self._watchmanclient.query(*watchmanargs)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/pywatchman/__init__.py", line 996, in query
+      self._connect()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/pywatchman/__init__.py", line 863, in _connect
+      self.sockpath = self._resolvesockname()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/pywatchman/__init__.py", line 848, in _resolvesockname
+      raise WatchmanError("watchman exited with code %d" % exitcode)
+  hgext.fsmonitor.pywatchman.WatchmanError: watchman exited with code 1
+  
+  During handling of the above exception, another exception occurred:
+  
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/__init__.py", line 188, in debuginstall
+      v = c.command(b"version")
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 108, in command
+      return self._command(*args)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 103, in _command
+      raise Unavailable(str(ex))
+  hgext.fsmonitor.watchmanclient.Unavailable: <exception str() failed>
+  
+  During handling of the above exception, another exception occurred:
+  
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/bin/hg", line 36, in <module>
+      dispatch.run()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 111, in run
+      status = dispatch(req)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 250, in dispatch
+      ret = _runcatch(req) or 0
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 424, in _runcatch
+      return _callcatch(ui, _runcatchfunc)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 433, in _callcatch
+      return scmutil.callcatch(ui, func)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/scmutil.py", line 177, in callcatch
+      return func()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 414, in _runcatchfunc
+      return _dispatch(req)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1174, in _dispatch
+      lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 862, in runcommand
+      ret = _runcommand(ui, options, cmd, d)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1185, in _runcommand
+      return cmdfunc()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 1171, in <lambda>
+      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/util.py", line 1843, in check
+      return func(*args, **kwargs)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/debugcommands.py", line 1696, in debuginstall
+      problems += handler(ui, fm)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/__init__.py", line 195, in debuginstall
+      err = str(e)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/fsmonitor/watchmanclient.py", line 27, in __str__
+      return b'warning: Watchman unavailable: %s' % self.msg
+  TypeError: %b requires bytes, or an object that implements __bytes__, not 'str'
+  [1]
 
 
 #if test-repo
@@ -222,17 +342,26 @@
   > EOF
 
   $ ( testrepohgenv; "$PYTHON" wixxml.py help )
-  Not installed:
-    help/common.txt
-    help/hg-ssh.8.txt
-    help/hg.1.txt
-    help/hgignore.5.txt
-    help/hgrc.5.txt
-  Not tracked:
+  Traceback (most recent call last):
+    File "wixxml.py", line 40, in <module>
+      xml = ET.parse("%s/../contrib/packaging/wix/%s.wxs" % (testdir, sys.argv[1]))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/xml/etree/ElementTree.py", line 1195, in parse
+      tree.parse(source, parser)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/xml/etree/ElementTree.py", line 585, in parse
+      source = open(source, "rb")
+  FileNotFoundError: [Errno 2] $ENOENT$: '/hgwork/src/tests/../contrib/packaging/wix/help.wxs'
+  [1]
 
   $ ( testrepohgenv; "$PYTHON" wixxml.py templates )
-  Not installed:
-  Not tracked:
+  Traceback (most recent call last):
+    File "wixxml.py", line 40, in <module>
+      xml = ET.parse("%s/../contrib/packaging/wix/%s.wxs" % (testdir, sys.argv[1]))
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/xml/etree/ElementTree.py", line 1195, in parse
+      tree.parse(source, parser)
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/xml/etree/ElementTree.py", line 585, in parse
+      source = open(source, "rb")
+  FileNotFoundError: [Errno 2] $ENOENT$: '/hgwork/src/tests/../contrib/packaging/wix/templates.wxs'
+  [1]
 
 #endif
 

test-largefiles.t

--- /hgwork/src/tests/test-largefiles.t
+++ /hgwork/src/tests/test-largefiles.t.err
@@ -226,6 +226,29 @@
 
   $ SCRIPT_NAME=''    > "$PYTHON" "$TESTTMP/hgweb.cgi" > /dev/null
+  Traceback (most recent call last):
+    File "$TESTTMP/hgweb.cgi", line 3, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 Test archiving the various revisions.  These hit corner cases known with
 archiving.

test-lfs-serve-access.t

--- /hgwork/src/tests/test-lfs-serve-access.t
+++ /hgwork/src/tests/test-lfs-serve-access.t.err
@@ -121,43 +121,10 @@
    branchmerge: False, force: False, partial: False
    ancestor: 000000000000, local: 000000000000+, remote: 525251863cad
   lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs
-  Status: 200
-  Content-Length: 371
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e"
-          }
-        }
-        "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e"
-        "size": 20
-      }
-    ]
-    "transfer": "basic"
-  }
-  lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes)
-  Status: 200
-  Content-Length: 20
-  Content-Type: application/octet-stream
-  Date: $HTTP_DATE$
-  Server: testing stub value
-  lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache
-  lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e
-  lfs: downloaded 1 files (20 bytes)
-   lfs.bin: remote created -> g
-  getting lfs.bin
-  lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
+  (sent 3 HTTP requests and 1318 bytes; received 1063 bytes in responses)
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs/objects/batch, action=download)
+  [255]
 
   $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
 
@@ -166,8 +133,27 @@
   $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob)
   $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 500 -
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/subdir/mount/point/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
 
 Blobs that already exist in the usercache are linked into the repo store, even
 though the client doesn't send the blob.
@@ -180,21 +166,53 @@
 
   $ hg --config "lfs.usercache=$TESTTMP/servercache" -R cloned2 --debug    >    push http://localhost:$HGPORT | grep '^[{} ]'
-  {
-    "objects": [
-      {
-        "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e"
-        "size": 20
-      }
-    ]
-    "transfer": "basic"
-  }
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=upload)
+  [1]
   $ find server2/.hg/store/lfs/objects | sort
-  server2/.hg/store/lfs/objects
-  server2/.hg/store/lfs/objects/f0
-  server2/.hg/store/lfs/objects/f0/3217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e
+  find: 'server2/.hg/store/lfs/objects': $ENOENT$
   $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
   $ cat $TESTTMP/errors.log
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/subdir/mount/point/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
 
   $ cat >> $TESTTMP/lfsstoreerror.py <<EOF
   > import errno
@@ -265,7 +283,8 @@
   added 1 changesets with 1 changes to 1 files
   new changesets 525251863cad
   updating to branch default
-  abort: LFS server error for "lfs.bin": Internal server error!
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=download)
   [255]
 
 Test an I/O error in localstore.verify() (Batch API) with PUT
@@ -275,7 +294,8 @@
   $ hg -R client push http://localhost:$HGPORT1
   pushing to http://localhost:$HGPORT1/
   searching for changes
-  abort: LFS server error for "unknown": Internal server error!
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=upload)
   [255]
 TODO: figure out how to associate the file name in the error above
 
@@ -284,7 +304,8 @@
   $ hg -R client push http://localhost:$HGPORT1
   pushing to http://localhost:$HGPORT1/
   searching for changes
-  abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)!
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=upload)
   [255]
 
   $ echo 'test lfs file' > server/lfs3.bin
@@ -296,14 +317,16 @@
 
   $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs    >    -R client update -r tip
-  abort: LFS HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)!
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=download)
   [255]
 
 Test a checksum failure during the processing of the GET request
 
   $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs    >    -R client update -r tip
-  abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)!
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=download)
   [255]
 
   $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
@@ -312,72 +335,89 @@
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=525251863cad618e55d483555f3d00a2ca99597e&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
 
   $ grep -v '  File "' $TESTTMP/errors.log
-  $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.git/info/lfs/objects/batch': (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      verifies = store.verify(oid) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:   (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.git/info/lfs/objects/batch': (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      verifies = store.verify(oid) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:   (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      localstore.download(oid, req.bodyfh) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      super(badstore, self).download(oid, src) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      _(b'corrupt remote lfs object: %s') % oid (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:   (glob)
-  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob)
-  Traceback (most recent call last):
-      self.do_write()
-      self.do_hgweb()
-      for chunk in self.server.application(env, self._start_response):
-      for r in self._runwsgi(req, res, repo):
-      rctx, req, res, self.check_perm
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+      self.do_write()
+      self.do_hgweb()
+      for chunk in self.server.application(env, self._start_response):
+      for r in self._runwsgi(req, res, repo):
       return func(*(args + a), **kw) (no-py3 !)
-      rctx.repo, req, res, lambda perm: checkperm(rctx, req, perm)
-      res.setbodybytes(localstore.read(oid))
-      blob = self._read(self.vfs, oid, verify)
-      raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8"))
-  *Error: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error (glob)
-  
-  $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      res.setbodybytes(localstore.read(oid)) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      blob = self._read(self.vfs, oid, verify) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      blobstore._verify(oid, b'dummy content') (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:      hint=_(b'run hg verify'), (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:   (glob)
+      rctx, req, res, self.check_perm
+      return _processbatchrequest(rctx.repo, req, res)
+      lfsreq = json.loads(req.bodyfh.read())
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+      self.do_write()
+      self.do_hgweb()
+      for chunk in self.server.application(env, self._start_response):
+      for r in self._runwsgi(req, res, repo):
+      rctx, req, res, self.check_perm
+      return _processbatchrequest(rctx.repo, req, res)
+      lfsreq = json.loads(req.bodyfh.read())
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+      self.do_write()
+      self.do_hgweb()
+      for chunk in self.server.application(env, self._start_response):
+      for r in self._runwsgi(req, res, repo):
+      rctx, req, res, self.check_perm
+      return _processbatchrequest(rctx.repo, req, res)
+      lfsreq = json.loads(req.bodyfh.read())
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+      self.do_write()
+      self.do_hgweb()
+      for chunk in self.server.application(env, self._start_response):
+      for r in self._runwsgi(req, res, repo):
+      rctx, req, res, self.check_perm
+      return _processbatchrequest(rctx.repo, req, res)
+      lfsreq = json.loads(req.bodyfh.read())
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+      self.do_write()
+      self.do_hgweb()
+      for chunk in self.server.application(env, self._start_response):
+      for r in self._runwsgi(req, res, repo):
+      rctx, req, res, self.check_perm
+      return _processbatchrequest(rctx.repo, req, res)
+      lfsreq = json.loads(req.bodyfh.read())
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
 
 Basic Authorization headers are returned by the Batch API, and sent back with
 the GET/PUT request.
@@ -400,28 +440,15 @@
   $ mv hg.pid $DAEMON_PIDS
 
   $ hg clone --debug http://localhost:$HGPORT1 auth_clone | egrep '^[{}]|  '
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-              "Authorization": "Basic dXNlcjpwYXNz"
-            }
-            "href": "http://localhost:$HGPORT1/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d"
-          }
-        }
-        "oid": "276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d"
-        "size": 14
-      }
-    ]
-    "transfer": "basic"
-  }
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=download)
+  [1]
 
   $ echo 'another blob' > auth_clone/lfs.blob
   $ hg -R auth_clone ci -Aqm 'add blob'
+  abort: last update was interrupted
+  (use 'hg update' to get a consistent checkout)
+  [255]
 
   $ cat > use_digests.py << EOF
   > from mercurial import (
@@ -444,30 +471,11 @@
   $ hg -R auth_clone push --config extensions.x=use_digests.py
   pushing to http://localhost:$HGPORT1/
   searching for changes
-  abort: LFS HTTP error: HTTP Error 401: the server must support Basic Authentication!
-  (api=http://localhost:$HGPORT1/.git/info/lfs/objects/batch, action=upload)
-  [255]
+  no changes found
+  [1]
 
   $ hg -R auth_clone --debug push | egrep '^[{}]|  '
-  {
-    "objects": [
-      {
-        "actions": {
-          "upload": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-              "Authorization": "Basic dXNlcjpwYXNz"
-            }
-            "href": "http://localhost:$HGPORT1/.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3"
-          }
-        }
-        "oid": "df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3"
-        "size": 13
-      }
-    ]
-    "transfer": "basic"
-  }
+  [1]
 
   $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
 
@@ -477,30 +485,42 @@
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 200 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgtest-authtype:Digest (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 401 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
+  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 401 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+506bf3d83f78c54b89e81c6411adee19fdf02156 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
+  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+506bf3d83f78c54b89e81c6411adee19fdf02156 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 401 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - x-hgtest-authtype:Digest (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 401 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
+  $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
+  $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
+  $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
+  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+506bf3d83f78c54b89e81c6411adee19fdf02156 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3 HTTP/1.1" 201 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
   $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  

test-lfs-serve.t#lfsremote-on

--- /hgwork/src/tests/test-lfs-serve.t
+++ /hgwork/src/tests/test-lfs-serve.t#lfsremote-on.err
@@ -233,21 +233,19 @@
   [255]
 #else
   $ hg push -q
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=upload)
+  [255]
 #endif
   $ grep 'lfs' .hg/requires $SERVER_REQUIRES
   .hg/requires:lfs
-  $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
 
   $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone
   $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true
-  $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !)
-  $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
 
   $ hg init $TESTTMP/client3_pull
   $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
   $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true
-  $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
-  $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
 
 Test that the commit/changegroup requirement check hook can be run multiple
 times.
@@ -276,7 +274,7 @@
 The difference here is the push failed above when the extension isn't
 enabled on the server.
   $ hg identify http://localhost:$HGPORT
-  8374dc4052cb (lfsremote-on !)
+  1477875038c6
   1477875038c6 (lfsremote-off !)
 
 Don't bother testing the lfsremote-off cases- the server won't be able
@@ -302,22 +300,24 @@
   $ echo 'non-lfs' > nonlfs2.txt
   $ hg ci -Aqm 'non-lfs'
   $ grep 'lfs' .hg/requires $SERVER_REQUIRES
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg push -q --force
   warning: repository is unrelated
   $ grep 'lfs' .hg/requires $SERVER_REQUIRES
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg clone http://localhost:$HGPORT $TESTTMP/client4_clone
-  (remote is using large file support (lfs), but it is explicitly disabled in the local configuration)
-  abort: repository requires features unknown to this Mercurial: lfs!
-  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
-  [255]
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 2 changes to 2 files (+1 heads)
+  new changesets d437e1d24fbd:03b080fa9d93
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES
-  grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$
-  $TESTTMP/server/.hg/requires:lfs
-  [2]
+  [1]
 
 TODO: fail more gracefully.
 
@@ -325,11 +325,14 @@
   $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT
   pulling from http://localhost:$HGPORT/
   requesting all changes
-  remote: abort: no common changegroup version
-  abort: pull failed on remote
-  [255]
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 2 changes to 2 files (+1 heads)
+  new changesets d437e1d24fbd:03b080fa9d93
+  (run 'hg heads' to see heads, 'hg merge' to merge)
   $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg identify http://localhost:$HGPORT
   03b080fa9d93
@@ -347,18 +350,16 @@
 
   $ hg push -q
   $ grep 'lfs' .hg/requires $SERVER_REQUIRES
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone
   $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES
-  $TESTTMP/client5_clone/.hg/requires:lfs
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg init $TESTTMP/client5_pull
   $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT
   $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES
-  $TESTTMP/client5_pull/.hg/requires:lfs
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg identify http://localhost:$HGPORT
   c729025cc5e3
@@ -388,14 +389,12 @@
   
   # LFS required- both lfs and non-lfs revlogs have 0x2000 flag
   *** runcommand debugprocessors lfs.bin -R ../server
-  registered processor '0x8000'
-  registered processor '0x2000'
+  abort: revlog 'lfs.bin' not found
+   [255]
   *** runcommand debugprocessors nonlfs2.txt -R ../server
   registered processor '0x8000'
-  registered processor '0x2000'
   *** runcommand config extensions --cwd ../server
   extensions.debugprocessors=$TESTTMP/debugprocessors.py
-  extensions.lfs=
   
   # LFS not enabled- revlogs don't have 0x2000 flag
   *** runcommand debugprocessors nonlfs3.txt
@@ -441,8 +440,8 @@
   
   # LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag
   *** runcommand debugprocessors lfs.bin -R ../server
-  registered processor '0x8000'
-  registered processor '0x2000'
+  abort: revlog 'lfs.bin' not found
+   [255]
   *** runcommand debugprocessors nonlfs2.txt -R ../server
   registered processor '0x8000'
   registered processor '0x2000'
@@ -476,27 +475,16 @@
   pushing to http://localhost:$HGPORT/
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
   searching for changes
-  remote has heads on branch 'default' that are not known locally: 8374dc4052cb
-  lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
-  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
-  lfs: uploaded 1 files (25 bytes)
-  1 changesets found
-  uncompressed size of bundle content:
-       206 (changelog)
-       172 (manifests)
-       275  lfs2.txt
-  remote: adding changesets
-  remote: adding manifests
-  remote: adding file changes
-  remote: added 1 changesets with 1 changes to 1 files
+  remote has heads on branch 'default' that are not known locally: 1477875038c6
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=upload)
+  [255]
   $ grep 'lfs' .hg/requires $SERVER_REQUIRES
   .hg/requires:lfs
-  $TESTTMP/server/.hg/requires:lfs
 
   $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone
   $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES
-  $TESTTMP/client6_clone/.hg/requires:lfs
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg init $TESTTMP/client6_pull
   $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT
@@ -506,27 +494,20 @@
   adding manifests
   adding file changes
   calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
-  added 6 changesets with 5 changes to 5 files (+1 heads)
-  new changesets d437e1d24fbd:d3b84d50eacb
+  added 4 changesets with 3 changes to 3 files (+1 heads)
+  new changesets d437e1d24fbd:c729025cc5e3
   resolving manifests
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
-  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
-  lfs: downloaded 1 files (25 bytes)
-  getting lfs2.txt
-  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
   getting nonlfs2.txt
   getting nonlfs3.txt
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  updated to "d3b84d50eacb: lfs file with lfs client"
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to "c729025cc5e3: non-lfs file with lfs client"
   1 other heads for branch "default"
-  (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
+  (sent 3 HTTP requests and 1305 bytes; received 1361 bytes in responses)
   $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES
-  $TESTTMP/client6_pull/.hg/requires:lfs
-  $TESTTMP/server/.hg/requires:lfs
+  [1]
 
   $ hg identify http://localhost:$HGPORT
-  d3b84d50eacb
+  c729025cc5e3
 
 --------------------------------------------------------------------------------
 Misc: process dies early if a requirement exists and the extension is disabled
@@ -540,6 +521,9 @@
   $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin
   $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair'
   $ hg -R $TESTTMP/client6_clone push -q
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=upload)
+  [255]
 
   $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch
 
@@ -547,151 +531,73 @@
 
   $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{rawdata}
{path}
'
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  version https://git-lfs.github.com/spec/v1
-  oid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
-  size 20
-  x-is-binary 0
-  
-  lfspair1.bin
+  lfspair1.bin: no such file in rev c729025cc5e3
+  [1]
 
   $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T json
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  [lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
-  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
-  lfs: downloaded 1 files (20 bytes)
-  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
-  
-   {
-    "data": "this is an lfs file
",
-    "path": "lfspair1.bin",
-    "rawdata": "version https://git-lfs.github.com/spec/v1
oid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
size 20
x-is-binary 0
"
-   }
+  [lfspair1.bin: no such file in rev c729025cc5e3
+  
   ]
+  [1]
 
   $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
+  rm: cannot remove '$TESTTMP/bulkfetch/.hg/store/lfs': $ENOENT$
+  [1]
 
   $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{data}
'
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
-  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
-  lfs: downloaded 1 files (20 bytes)
-  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
-  this is an lfs file
-  
+  lfspair1.bin: no such file in rev c729025cc5e3
+  [1]
   $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair2.bin
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
-  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
-  lfs: downloaded 1 files (24 bytes)
-  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
-  this is an lfs file too
+  lfspair2.bin: no such file in rev c729025cc5e3
+  [1]
 
 Export will prefetch all needed files across all needed revisions
 
   $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
+  rm: cannot remove '$TESTTMP/bulkfetch/.hg/store/lfs': $ENOENT$
+  [1]
   $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
   exporting patches:
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: need to transfer 4 objects (92 bytes)
-  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
-  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
-  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
-  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
-  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
-  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
-  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
-  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
-  lfs: downloaded 4 files (92 bytes)
   all.export
-  lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
-  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
-  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
-  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
 
 Export with selected files is used with `extdiff --patch`
 
   $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
+  rm: cannot remove '$TESTTMP/bulkfetch/.hg/store/lfs': $ENOENT$
+  [1]
   $ hg --config extensions.extdiff=    >    -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
-  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
-  lfs: downloaded 1 files (23 bytes)
-  */hg-8374dc4052cb.patch (glob)
-  lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
-  */hg-9640b57e77b1.patch (glob)
-  --- */hg-8374dc4052cb.patch	* (glob)
-  +++ */hg-9640b57e77b1.patch	* (glob)
-  @@ -2,12 +2,7 @@
+  /hgwork/tmp/extdiff.j8u482yf/hg-03b080fa9d93.patch
+  /hgwork/tmp/extdiff.j8u482yf/hg-c729025cc5e3.patch
+  --- /hgwork/tmp/extdiff.j8u482yf/hg-03b080fa9d93.patch	2019-10-24 01:49:17.751401767 +0000
+  +++ /hgwork/tmp/extdiff.j8u482yf/hg-c729025cc5e3.patch	2019-10-24 01:49:17.751401767 +0000
+  @@ -2,7 +2,7 @@
    # User test
    # Date 0 0
    #      Thu Jan 01 00:00:00 1970 +0000
-  -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354
-  -# Parent  1477875038c60152e391238920a16381c627b487
-  -lfs
-  +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1
-  +# Parent  d3b84d50eacbd56638e11abce6b8616aaba54420
-  +add lfs pair
+  -# Node ID 03b080fa9d9331bf95fd00f5b646610fff0894af
+  -# Parent  0000000000000000000000000000000000000000
+  -non-lfs
+  +# Node ID c729025cc5e38516361a042f835d2b7894050ff6
+  +# Parent  03b080fa9d9331bf95fd00f5b646610fff0894af
+  +non-lfs file with lfs client
    
-  -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin
-  ---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  -+++ b/lfs.bin	Thu Jan 01 00:00:00 1970 +0000
-  -@@ -0,0 +1,1 @@
-  -+this is a big lfs file
   cleaning up temp directory
   [1]
 
 Diff will prefetch files
 
   $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
+  rm: cannot remove '$TESTTMP/bulkfetch/.hg/store/lfs': $ENOENT$
+  [1]
   $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: need to transfer 4 objects (92 bytes)
-  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
-  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
-  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
-  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
-  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
-  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
-  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
-  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
-  lfs: downloaded 4 files (92 bytes)
-  lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
-  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
-  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
-  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
-  diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin
-  --- a/lfs.bin	Thu Jan 01 00:00:00 1970 +0000
-  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  @@ -1,1 +0,0 @@
-  -this is a big lfs file
-  diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt
-  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/lfs2.txt	Thu Jan 01 00:00:00 1970 +0000
-  @@ -0,0 +1,1 @@
-  +this is another lfs file
-  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin
-  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/lfspair1.bin	Thu Jan 01 00:00:00 1970 +0000
-  @@ -0,0 +1,1 @@
-  +this is an lfs file
-  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
-  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/lfspair2.bin	Thu Jan 01 00:00:00 1970 +0000
-  @@ -0,0 +1,1 @@
-  +this is an lfs file too
-  diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt
-  --- a/nonlfs.txt	Thu Jan 01 00:00:00 1970 +0000
-  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  @@ -1,1 +0,0 @@
-  -non-lfs
-  diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt
+  diff -r 03b080fa9d93 -r c729025cc5e3 nonlfs3.txt
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/nonlfs3.txt	Thu Jan 01 00:00:00 1970 +0000
   @@ -0,0 +1,1 @@
@@ -700,21 +606,73 @@
 Only the files required by diff are prefetched
 
   $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
+  rm: cannot remove '$TESTTMP/bulkfetch/.hg/store/lfs': $ENOENT$
+  [1]
   $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin
   lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
-  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
-  lfs: downloaded 1 files (24 bytes)
-  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
-  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
-  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/lfspair2.bin	Thu Jan 01 00:00:00 1970 +0000
-  @@ -0,0 +1,1 @@
-  +this is an lfs file too
 
 #endif
 
   $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS
 
   $ cat $TESTTMP/errors.log
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  

test-lfs-test-server.t#hg-server

--- /hgwork/src/tests/test-lfs-test-server.t
+++ /hgwork/src/tests/test-lfs-test-server.t#hg-server.err
@@ -82,72 +82,12 @@
   checking for updated bookmarks
   listing keys for "bookmarks"
   lfs: computing set of blobs to upload
-  Status: 200
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
   Content-Length: 309 (git-server !)
-  Content-Length: 350 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "upload": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=upload)
             "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !)
-            "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !)
-          }
-        }
-        "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
-        "size": 12
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
   Status: 200 (git-server !)
-  Status: 201 (hg-server !)
-  Content-Length: 0
-  Content-Type: text/plain; charset=utf-8
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
-  lfs: uploaded 1 files (12 bytes)
-  1 changesets found
-  list of changesets:
-  99a7098854a3984a5c9eab0fc7a2906697b7cb5c
-  bundle2-output-bundle: "HG20", 4 parts total
-  bundle2-output-part: "replycaps" * bytes payload (glob)
-  bundle2-output-part: "check:heads" streamed payload
-  bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
-  bundle2-output-part: "phase-heads" 24 bytes payload
-  bundle2-input-bundle: with-transaction
-  bundle2-input-part: "replycaps" supported
-  bundle2-input-part: total payload size * (glob)
-  bundle2-input-part: "check:heads" supported
-  bundle2-input-part: total payload size 20
-  bundle2-input-part: "changegroup" (params: 1 mandatory) supported
-  adding changesets
-  add changeset 99a7098854a3
-  adding manifests
-  adding file changes
-  adding a revisions
-  calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
-  bundle2-input-part: total payload size 617
-  bundle2-input-part: "phase-heads" supported
-  bundle2-input-part: total payload size 24
-  bundle2-input-bundle: 4 parts total
-  updating the branch cache
-  added 1 changesets with 1 changes to 1 files
-  bundle2-output-bundle: "HG20", 1 parts total
-  bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
-  bundle2-input-bundle: no-transaction
-  bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
-  bundle2-input-bundle: 1 parts total
-  listing keys for "phases"
+  [255]
   $ mv .hg/store/lfs_ .hg/store/lfs
 
 Clear the cache to force a download
@@ -155,48 +95,9 @@
   $ cd ../repo2
   $ hg update tip --debug
   http auth: user foo, password ***
-  resolving manifests
-   branchmerge: False, force: False, partial: False
-   ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3
-  http auth: user foo, password ***
-  Status: 200
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   Content-Length: 311 (git-server !)
-  Content-Length: 352 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob)
-          }
-        }
-        "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
-        "size": 12
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
-  Status: 200
-  Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
-  lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
-  lfs: downloaded 1 files (12 bytes)
-   a: remote created -> g
-  getting a
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  Content-Type: text/plain; charset=utf-8 (git-server !)
 
 When the server has some blobs already.  `hg serve` doesn't offer to upload
 blobs that it already knows about.  Note that lfs-test-server is simply
@@ -204,31 +105,26 @@
 actions property completely.
 
   $ hg mv a b
+  a: $ENOENT$
+  abort: no files to copy
+  [255]
   $ echo ANOTHER-LARGE-FILE > c
   $ echo ANOTHER-LARGE-FILE2 > d
   $ hg commit -m b-and-c -A b c d
+  b: $ENOENT$
+  abort: failed to mark all new/missing files as added/removed
+  [255]
   $ hg push ../repo1 --debug
   http auth: user foo, password ***
   pushing to ../repo1
   http auth: user foo, password ***
-  http auth: user foo, password ***
   query 1; heads
-  searching for changes
-  all remote heads known locally
   listing keys for "phases"
   checking for updated bookmarks
   listing keys for "bookmarks"
-  listing keys for "bookmarks"
-  lfs: computing set of blobs to upload
-  Status: 200
+  no changes found
+  listing keys for "phases"
   Content-Length: 901 (git-server !)
-  Content-Length: 755 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
         "actions": { (git-server !)
           "download": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -238,168 +134,18 @@
             "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !)
           } (git-server !)
         } (git-server !)
-        "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
-        "size": 12
-      }
-      {
-        "actions": {
-          "upload": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob)
-          }
-        }
-        "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
-        "size": 20
-      }
-      {
-        "actions": {
-          "upload": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob)
-          }
-        }
-        "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
-        "size": 19
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: need to transfer 2 objects (39 bytes)
-  lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
   Status: 200 (git-server !)
-  Status: 201 (hg-server !)
-  Content-Length: 0
-  Content-Type: text/plain; charset=utf-8
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
-  lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
   Status: 200 (git-server !)
-  Status: 201 (hg-server !)
-  Content-Length: 0
-  Content-Type: text/plain; charset=utf-8
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
-  lfs: uploaded 2 files (39 bytes)
-  1 changesets found
-  list of changesets:
-  dfca2c9e2ef24996aa61ba2abd99277d884b3d63
-  bundle2-output-bundle: "HG20", 5 parts total
-  bundle2-output-part: "replycaps" * bytes payload (glob)
-  bundle2-output-part: "check:phases" 24 bytes payload
-  bundle2-output-part: "check:heads" streamed payload
-  bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
-  bundle2-output-part: "phase-heads" 24 bytes payload
-  bundle2-input-bundle: with-transaction
-  bundle2-input-part: "replycaps" supported
-  bundle2-input-part: total payload size * (glob)
-  bundle2-input-part: "check:phases" supported
-  bundle2-input-part: total payload size 24
-  bundle2-input-part: "check:heads" supported
-  bundle2-input-part: total payload size 20
-  bundle2-input-part: "changegroup" (params: 1 mandatory) supported
-  adding changesets
-  add changeset dfca2c9e2ef2
-  adding manifests
-  adding file changes
-  adding b revisions
-  adding c revisions
-  adding d revisions
-  bundle2-input-part: total payload size 1315
-  bundle2-input-part: "phase-heads" supported
-  bundle2-input-part: total payload size 24
-  bundle2-input-bundle: 5 parts total
-  updating the branch cache
-  added 1 changesets with 3 changes to 3 files
-  bundle2-output-bundle: "HG20", 1 parts total
-  bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
-  bundle2-input-bundle: no-transaction
-  bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
-  bundle2-input-bundle: 1 parts total
-  listing keys for "phases"
+  [1]
 
 Clear the cache to force a download
   $ rm -rf `hg config lfs.usercache`
   $ hg --repo ../repo1 update tip --debug
   http auth: user foo, password ***
-  resolving manifests
-   branchmerge: False, force: False, partial: False
-   ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2
-  http auth: user foo, password ***
-  Status: 200
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   Content-Length: 608 (git-server !)
-  Content-Length: 670 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob)
-          }
-        }
-        "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
-        "size": 20
-      }
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob)
-          }
-        }
-        "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
-        "size": 19
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: need to transfer 2 objects (39 bytes)
-  lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
-  Status: 200
-  Content-Length: 20
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
-  lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
-  lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
-  Status: 200
-  Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
-  lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
-  lfs: downloaded 2 files (39 bytes)
-   b: remote created -> g
-  getting b
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-   c: remote created -> g
-  getting c
-  lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
-   d: remote created -> g
-  getting d
-  lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
 
 Test a corrupt file download, but clear the cache first to force a download.
 `hg serve` indicates a corrupt file without transferring it, unlike
@@ -411,9 +157,15 @@
   $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
 #else
   $ cp $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob
+  cp: cannot stat '$TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998': $ENOENT$
+  [1]
   $ echo 'damage' > $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
+  $TESTTMP.sh: 64: $TESTTMP.sh: cannot create $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998: Directory nonexistent
+  [2]
 #endif
   $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
+  rm: cannot remove '../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998': $ENOENT$
+  [1]
   $ rm ../repo1/*
 
 TODO: give the proper error indication from `hg serve`
@@ -422,17 +174,12 @@
   http auth: user foo, password ***
   resolving manifests
    branchmerge: False, force: True, partial: False
-   ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2
-  http auth: user foo, password ***
-  Status: 200
+   ancestor: 99a7098854a3+, local: 99a7098854a3+, remote: 99a7098854a3
+   a: remote created -> g
+  getting a
   Content-Length: 311 (git-server !)
-  Content-Length: 183 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
+  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
         "actions": { (git-server !)
           "download": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -441,24 +188,12 @@
             } (git-server !)
             "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !)
           } (git-server !)
-        "error": { (hg-server !)
-          "code": 422 (hg-server !)
-          "message": "The object is corrupt" (hg-server !)
-        }
-        "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
-        "size": 19
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
   lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !)
   Status: 200 (git-server !)
   Content-Length: 7 (git-server !)
   Content-Type: text/plain; charset=utf-8 (git-server !)
   Date: $HTTP_DATE$ (git-server !)
   abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !)
-  abort: LFS server error for "c": Validation error! (hg-server !)
-  [255]
 
 The corrupted blob is not added to the usercache or local store
 
@@ -470,222 +205,56 @@
   $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
 #else
   $ cp blob $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
+  cp: cannot stat 'blob': $ENOENT$
+  [1]
 #endif
 
 Test a corrupted file upload
 
   $ echo 'another lfs blob' > b
   $ hg ci -m 'another blob'
+  nothing changed
+  [1]
   $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0
+  $TESTTMP.sh: 82: $TESTTMP.sh: cannot create .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0: Directory nonexistent
+  [2]
   $ hg push --debug ../repo1
   http auth: user foo, password ***
   pushing to ../repo1
   http auth: user foo, password ***
-  http auth: user foo, password ***
   query 1; heads
-  searching for changes
-  all remote heads known locally
   listing keys for "phases"
   checking for updated bookmarks
   listing keys for "bookmarks"
-  listing keys for "bookmarks"
-  lfs: computing set of blobs to upload
-  Status: 200
+  no changes found
+  listing keys for "phases"
   Content-Length: 309 (git-server !)
-  Content-Length: 350 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "upload": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" (glob)
-          }
-        }
-        "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0"
-        "size": 17
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes)
-  abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0
-  (run hg verify)
-  [255]
+  [1]
 
 Archive will prefetch blobs in a group
 
   $ rm -rf .hg/store/lfs `hg config lfs.usercache`
   $ hg archive --debug -r 1 ../archive
   http auth: user foo, password ***
-  http auth: user foo, password ***
-  Status: 200
+  abort: unknown revision '1'!
   Content-Length: 905 (git-server !)
-  Content-Length: 988 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob)
-          }
-        }
-        "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
-        "size": 12
-      }
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob)
-          }
-        }
-        "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
-        "size": 20
-      }
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob)
-          }
-        }
-        "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
-        "size": 19
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: need to transfer 3 objects (51 bytes)
-  lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
-  Status: 200
-  Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
-  lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
-  lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
-  Status: 200
-  Content-Length: 20
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
-  lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
-  lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
-  Status: 200
-  Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
-  lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
-  lfs: downloaded 3 files (51 bytes)
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-  lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
-  lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  [255]
   $ find ../archive | sort
-  ../archive
-  ../archive/.hg_archival.txt
-  ../archive/a
-  ../archive/b
-  ../archive/c
-  ../archive/d
+  find: '../archive': $ENOENT$
 
 Cat will prefetch blobs in a group
 
   $ rm -rf .hg/store/lfs `hg config lfs.usercache`
   $ hg cat --debug -r 1 a b c nonexistent
   http auth: user foo, password ***
-  http auth: user foo, password ***
-  Status: 200
+  abort: unknown revision '1'!
   Content-Length: 608 (git-server !)
-  Content-Length: 670 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob)
-          }
-        }
-        "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
-        "size": 12
-      }
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob)
-          }
-        }
-        "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
-        "size": 19
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: need to transfer 2 objects (31 bytes)
-  lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
-  Status: 200
-  Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
-  lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
-  lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
-  Status: 200
-  Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
-  lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
-  lfs: downloaded 2 files (31 bytes)
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-  THIS-IS-LFS
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-  THIS-IS-LFS
-  lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
-  ANOTHER-LARGE-FILE
-  nonexistent: no such file in rev dfca2c9e2ef2
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  [255]
 
 Revert will prefetch blobs in a group
 
@@ -694,94 +263,12 @@
   $ rm *
   $ hg revert --all -r 1 --debug
   http auth: user foo, password ***
-  http auth: user foo, password ***
-  Status: 200
+  abort: unknown revision '1'!
   Content-Length: 905 (git-server !)
-  Content-Length: 988 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob)
-          }
-        }
-        "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
-        "size": 12
-      }
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob)
-          }
-        }
-        "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
-        "size": 20
-      }
-      {
-        "actions": {
-          "download": {
-            "expires_at": "$ISO_8601_DATE_TIME$"
-            "header": {
-              "Accept": "application/vnd.git-lfs"
-            }
-            "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob)
-          }
-        }
-        "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
-        "size": 19
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  lfs: need to transfer 3 objects (51 bytes)
-  lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
-  Status: 200
-  Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
-  lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
-  lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
-  Status: 200
-  Content-Length: 20
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
-  lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
-  lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
-  Status: 200
-  Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
-  lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
-  lfs: downloaded 3 files (51 bytes)
-  reverting b
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
-  reverting c
-  lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
-  reverting d
-  lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
-  adding a
-  lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  [255]
 
 Check error message when the remote missed a blob:
 
@@ -795,17 +282,11 @@
   http auth: user foo, password ***
   resolving manifests
    branchmerge: False, force: True, partial: False
-   ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e
-  http auth: user foo, password ***
-  Status: 200
+   ancestor: edc65fbb452c+, local: edc65fbb452c+, remote: 05001cf3ceee
+  http auth: user foo, password ***
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
   Content-Length: 308 (git-server !)
-  Content-Length: 186 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=download)
         "actions": { (git-server !)
           "upload": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -814,17 +295,6 @@
             } (git-server !)
             "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !)
           } (git-server !)
-        "error": { (hg-server !)
-          "code": 404 (hg-server !)
-          "message": "The object does not exist" (hg-server !)
-        }
-        "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13"
-        "size": 6
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  abort: LFS server error for "b": The object does not exist!
   [255]
 
 Check error message when object does not exist:
@@ -854,30 +324,48 @@
 
 #if hg-server
   $ cat $TESTTMP/access.log $TESTTMP/errors.log
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 201 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 201 - (glob)
-  $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 201 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob)
-  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
+  $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 500 -
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
+  $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.git/info/lfs/objects/batch':
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 123, in do_POST
+      self.do_write()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 116, in do_write
+      self.do_hgweb()
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/server.py", line 236, in do_hgweb
+      for chunk in self.server.application(env, self._start_response):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
+      for r in self._runwsgi(req, res, repo):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
+      rctx, req, res, self.check_perm
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 57, in handlewsgirequest
+      return _processbatchrequest(rctx.repo, req, res)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/lfs/wireprotolfsserver.py", line 136, in _processbatchrequest
+      lfsreq = json.loads(req.bodyfh.read())
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
+      s.__class__.__name__))
+  TypeError: the JSON object must be str, not 'bytes'
+  
 #endif
 
   $ mkdir $TESTTMP/lfs-server2
@@ -908,15 +396,9 @@
    branchmerge: False, force: False, partial: False
    ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8
   http auth: user foo, password ***
-  Status: 200
+  abort: LFS HTTP error: HTTP Error 500: Internal Server Error!
   Content-Length: 308 (git-server !)
-  Content-Length: 186 (hg-server !)
-  Content-Type: application/vnd.git-lfs+json
-  Date: $HTTP_DATE$
-  Server: testing stub value (hg-server !)
-  {
-    "objects": [
-      {
+  (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=download)
         "actions": { (git-server !)
           "upload": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -925,17 +407,6 @@
             } (git-server !)
             "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !)
           } (git-server !)
-        "error": { (hg-server !)
-          "code": 404 (hg-server !)
-          "message": "The object does not exist" (hg-server !)
-        }
-        "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a"
-        "size": 6
-      }
-    ]
-    "transfer": "basic" (hg-server !)
-  }
-  abort: LFS server error for "a": The object does not exist!
   [255]
 
   $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS

test-merge-combination.t

test-mq.t

--- /hgwork/src/tests/test-mq.t
+++ /hgwork/src/tests/test-mq.t.err
@@ -1594,7 +1594,29 @@
 #endif
   $ QUERY_STRING='style=raw'
   $ "$PYTHON" hgweb.cgi | grep '^tip'
-  tip	[0-9a-f]{40} (re)
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 2, in <module>
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in <module>
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
   $ cd ..
 

test-newcgi.t

--- /hgwork/src/tests/test-newcgi.t
+++ /hgwork/src/tests/test-newcgi.t.err
@@ -53,7 +53,9 @@
 
   $ . "$TESTDIR/cgienv"
   $ "$PYTHON" hgweb.cgi > page1
+  [1]
   $ "$PYTHON" hgwebdir.cgi > page2
+  [1]
 
   $ PATH_INFO="/test/"
   $ PATH_TRANSLATED="/var/something/test.cgi"
@@ -61,6 +63,27 @@
   $ SCRIPT_URI="http://hg.omnifarious.org/test/test/"
   $ SCRIPT_URL="/test/test/"
   $ "$PYTHON" hgwebdir.cgi > page3
+  [1]
 
   $ grep -i error page1 page2 page3
-  [1]
+  page1:<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  page1:function calls leading up to the error, in the order they occurred.</p>
+  page1:<tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  page1:<tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  page1:&lt;built-in method with_traceback of ImportError object&gt;
+  page1:<!-- The above is a description of an error in a Python program, formatted
+  page1:ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  page2:<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  page2:function calls leading up to the error, in the order they occurred.</p>
+  page2:<tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  page2:<tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  page2:&lt;built-in method with_traceback of ImportError object&gt;
+  page2:<!-- The above is a description of an error in a Python program, formatted
+  page2:ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  page3:<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  page3:function calls leading up to the error, in the order they occurred.</p>
+  page3:<tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  page3:<tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  page3:&lt;built-in method with_traceback of ImportError object&gt;
+  page3:<!-- The above is a description of an error in a Python program, formatted
+  page3:ImportError: cannot import module cext.parsers (expected version: 13, actual: None)

test-newercgi.t

--- /hgwork/src/tests/test-newercgi.t
+++ /hgwork/src/tests/test-newercgi.t.err
@@ -47,7 +47,9 @@
 
   $ . "$TESTDIR/cgienv"
   $ "$PYTHON" hgweb.cgi > page1
+  [1]
   $ "$PYTHON" hgwebdir.cgi > page2
+  [1]
 
   $ PATH_INFO="/test/"
   $ PATH_TRANSLATED="/var/something/test.cgi"
@@ -55,6 +57,27 @@
   $ SCRIPT_URI="http://hg.omnifarious.org/test/test/"
   $ SCRIPT_URL="/test/test/"
   $ "$PYTHON" hgwebdir.cgi > page3
+  [1]
 
   $ grep -i error page1 page2 page3
-  [1]
+  page1:<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  page1:function calls leading up to the error, in the order they occurred.</p>
+  page1:<tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  page1:<tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  page1:&lt;built-in method with_traceback of ImportError object&gt;
+  page1:<!-- The above is a description of an error in a Python program, formatted
+  page1:ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  page2:<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  page2:function calls leading up to the error, in the order they occurred.</p>
+  page2:<tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  page2:<tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  page2:&lt;built-in method with_traceback of ImportError object&gt;
+  page2:<!-- The above is a description of an error in a Python program, formatted
+  page2:ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  page3:<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  page3:function calls leading up to the error, in the order they occurred.</p>
+  page3:<tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  page3:<tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  page3:&lt;built-in method with_traceback of ImportError object&gt;
+  page3:<!-- The above is a description of an error in a Python program, formatted
+  page3:ImportError: cannot import module cext.parsers (expected version: 13, actual: None)

test-notify.t

--- /hgwork/src/tests/test-notify.t
+++ /hgwork/src/tests/test-notify.t.err
@@ -419,39 +419,38 @@
   $ echo a >> a/a
   $ hg --cwd a --encoding utf-8 commit -A -d '0 0'    >   -m `"$PYTHON" -c 'print("àáâãä")'`
+  Traceback (most recent call last):
+    File "<string>", line 1, in <module>
+  UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-9: ordinal not in range(128)
+  hg commit: option -m requires argument
+  hg commit [OPTION]... [FILE]...
+  
+  commit the specified files or all outstanding changes
+  
+  options ([+] can be repeated):
+  
+   -A --addremove           mark new/missing files as added/removed before
+                            committing
+      --close-branch        mark a branch head as closed
+      --amend               amend the parent of the working directory
+   -s --secret              use the secret phase for committing
+   -e --edit                invoke editor on commit messages
+   -i --interactive         use interactive mode
+   -I --include PATTERN [+] include names matching the given patterns
+   -X --exclude PATTERN [+] exclude names matching the given patterns
+   -m --message TEXT        use text as commit message
+   -l --logfile FILE        read commit message from file
+   -d --date DATE           record the specified date as commit date
+   -u --user USER           record the specified user as committer
+   -S --subrepos            recurse into subrepositories
+  
+  (use 'hg commit -h' to show more help)
+  [255]
   $ hg --traceback --cwd b --encoding utf-8 pull ../a |    >   "$PYTHON" $TESTTMP/filter.py
   pulling from ../a
   searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  new changesets 0f25f9c22b4c
-  MIME-Version: 1.0
-  Content-Type: text/plain; charset="us-ascii"
-  Content-Transfer-Encoding: 8bit
-  X-Test: foo
-  Date: * (glob)
-  Subject: à... (esc)
-  From: test@test.com
-  X-Hg-Notification: changeset 0f25f9c22b4c
-  Message-Id: <*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset 0f25f9c22b4c in b
-  description: àáâãä (esc)
-  diffstat:
-   a |  1 + 1 files changed, 1 insertions(+), 0 deletions(-)
-  
-  diffs (7 lines):
-  
-  diff -r fccf66cd0c35 -r 0f25f9c22b4c a
-  --- a/a	Thu Jan 01 00:00:03 1970 +0000
-  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
-  @@ -1,2 +1,3 @@ a a
-  +a
-  (run 'hg update' to get a working copy)
+  no changes found
 
 long lines
 
@@ -470,48 +469,31 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  new changesets a846b5f6ebb7
-  notify: sending 2 subscribers 1 changes
+  new changesets 3ebb3db918ca
+  error: incoming.notify hook failed: decoding near 'nononononoф': 'ascii' codec can't decode byte 0xd1 in position 1329: ordinal not in range(128)! (esc)
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 205, in fromlocal
+      u = s.decode(_sysstr(encoding), _sysstr(encodingmode))
+  UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 1329: ordinal not in range(128)
+  
+  During handling of the above exception, another exception occurred:
+  
+  Traceback (most recent call last):
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hook.py", line 114, in pythonhook
+      r = obj(ui=ui, repo=repo, hooktype=htype, **pycompat.strkwargs(args))
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/notify.py", line 553, in hook
+      n.send(ctx, count, data)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/hgext/notify.py", line 387, in send
+      msg = p.parsestr(encoding.strfromlocal(data))
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 223, in unifromlocal
+      return fromlocal(s).decode('utf-8')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 210, in fromlocal
+      b"decoding near '%s': %s!" % (sub, pycompat.bytestr(inst))
+  mercurial.error.Abort: b"decoding near 'nononononoф': 'ascii' codec can't decode byte 0xd1 in position 1329: ordinal not in range(128)!"
   (run 'hg update' to get a working copy)
   $ "$PYTHON" $TESTTMP/filter.py < b/mbox
-  From test@test.com ... ... .. ..:..:.. .... (re)
-  MIME-Version: 1.0
-  Content-Type: text/plain; charset="*" (glob)
-  Content-Transfer-Encoding: quoted-printable
-  X-Test: foo
-  Date: * (glob)
-  Subject: long line
-  From: test@test.com
-  X-Hg-Notification: changeset a846b5f6ebb7
-  Message-Id: <hg.a846b5f6ebb7.*.*@*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset a846b5f6ebb7 in b
-  description: long line
-  diffstat:
-   a |  1 + 1 files changed, 1 insertions(+), 0 deletions(-)
-  
-  diffs (8 lines):
-  
-  diff -r 0f25f9c22b4c -r a846b5f6ebb7 a
-  --- a/a	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
-  @@ -1,3 +1,4 @@ a a a
-  +nonononononononononononononononononononononononononononononononononononono=
-  nononononononononononononononononononononononononononononononononononononon=
-  ononononononononononononononononononononononononononononononononononononono=
-  nononononononononononononononononononononononononononononononononononononon=
-  ononononononononononononononononononononononononononononononononononononono=
-  nononononononononononononononononononononononononononononononononononononon=
-  ononononononononononononononononononononononononononononononononononononono=
-  nononononononononononononononononononononononononononononononononononononon=
-  ononononononononononononononononononononononononononononononononononononono=
-  nononononononononononononononononononononononononononononononononononononon=
-  ononononononononononononononononononononononononononononononononononononono=
-  nononononononononononononononononononononononononononononononononononononon=
-  ononononononononononononononononononononononononononononononononononononono=
-  nonononononononononononono=D1=84
-  
+  $TESTTMP.sh: 128: $TESTTMP.sh: cannot open b/mbox: No such file
+  [2]
  revset selection: send to address that matches branch and repo
 
   $ cat << EOF >> $HGRCPATH
@@ -540,7 +522,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  new changesets f7e5aaed4080
+  new changesets 773df7862791
   MIME-Version: 1.0
   Content-Type: text/plain; charset="us-ascii"
   Content-Transfer-Encoding: 7bit
@@ -548,11 +530,11 @@
   Date: * (glob)
   Subject: test
   From: test@test.com
-  X-Hg-Notification: changeset f7e5aaed4080
-  Message-Id: <hg.f7e5aaed4080.*.*@*> (glob)
+  X-Hg-Notification: changeset 773df7862791
+  Message-Id: <hg.773df7862791.1571881799.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
   To: baz@test.com, foo@bar, notify@example.com
   
-  changeset f7e5aaed4080 in b
+  changeset 773df7862791 in b
   description: test
   (run 'hg update' to get a working copy)
 
@@ -570,7 +552,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files (+1 heads)
-  new changesets 645eb6690ecf
+  new changesets 3422d33b4154
   MIME-Version: 1.0
   Content-Type: text/plain; charset="us-ascii"
   Content-Transfer-Encoding: 7bit
@@ -578,11 +560,11 @@
   Date: * (glob)
   Subject: test
   From: test@test.com
-  X-Hg-Notification: changeset 645eb6690ecf
-  Message-Id: <hg.645eb6690ecf.*.*@*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset 645eb6690ecf in b
+  X-Hg-Notification: changeset 3422d33b4154
+  Message-Id: <hg.3422d33b4154.1571881800.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
+  To: baz@test.com, foo@bar
+  
+  changeset 3422d33b4154 in b
   description: test
   (run 'hg heads' to see heads)
 
@@ -599,12 +581,12 @@
   Date: * (glob)
   Subject: changeset in b: default template
   From: test@test.com
-  X-Hg-Notification: changeset 5cd4346eed47
-  Message-Id: <hg.5cd4346eed47.*.*@*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset 5cd4346eed47 in $TESTTMP/b
-  details: http://test/b?cmd=changeset;node=5cd4346eed47
+  X-Hg-Notification: changeset 0ec1284fec67
+  Message-Id: <hg.0ec1284fec67.1571881801.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
+  To: baz@test.com, foo@bar
+  
+  changeset 0ec1284fec67 in $TESTTMP/b
+  details: http://test/b?cmd=changeset;node=0ec1284fec67
   description: default template
 
 with style:
@@ -628,11 +610,11 @@
   Date: * (glob)
   Subject: with style
   From: test@test.com
-  X-Hg-Notification: changeset ec8d9d852f56
-  Message-Id: <hg.ec8d9d852f56.*.*@*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset ec8d9d852f56
+  X-Hg-Notification: changeset f35ab297a724
+  Message-Id: <hg.f35ab297a724.1571881802.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
+  To: baz@test.com, foo@bar
+  
+  changeset f35ab297a724
 
 with template (overrides style):
 
@@ -649,10 +631,10 @@
   Content-Type: text/plain; charset="us-ascii"
   Content-Transfer-Encoding: 7bit
   Date: * (glob)
-  Subject: 14721b538ae3: with template
-  From: test@test.com
-  X-Hg-Notification: changeset 14721b538ae3
-  Message-Id: <hg.14721b538ae3.*.*@*> (glob)
+  Subject: d4122a6521b3: with template
+  From: test@test.com
+  X-Hg-Notification: changeset d4122a6521b3
+  Message-Id: <hg.d4122a6521b3.1571881803.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
   To: baz@test.com, foo@bar
   
   with template
@@ -682,21 +664,21 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  new changesets b86bc16ff894
+  new changesets 22c4495f3535
   MIME-Version: 1.0
   Content-Type: text/plain; charset="us-ascii"
   Content-Transfer-Encoding: 7bit
   Date: * (glob)
   Subject: addfunction
   From: test@test.com
-  X-Hg-Notification: changeset b86bc16ff894
-  Message-Id: <hg.b86bc16ff894.*.*@*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset b86bc16ff894
+  X-Hg-Notification: changeset 22c4495f3535
+  Message-Id: <hg.22c4495f3535.1571881804.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
+  To: baz@test.com, foo@bar
+  
+  changeset 22c4495f3535
   diffs (11 lines):
   
-  diff -r 14721b538ae3 -r b86bc16ff894 f1
+  diff -r d4122a6521b3 -r 22c4495f3535 f1
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/f1	Thu Jan 01 00:00:00 1970 +0000
   @@ -0,0 +1,7 @@
@@ -725,21 +707,21 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  new changesets e81040e9838c
+  new changesets 8d5aad01b98f
   MIME-Version: 1.0
   Content-Type: text/plain; charset="us-ascii"
   Content-Transfer-Encoding: 7bit
   Date: * (glob)
   Subject: changefunction
   From: test@test.com
-  X-Hg-Notification: changeset e81040e9838c
-  Message-Id: <hg.e81040e9838c.*.*@*> (glob)
-  To: baz@test.com, foo@bar
-  
-  changeset e81040e9838c
+  X-Hg-Notification: changeset 8d5aad01b98f
+  Message-Id: <hg.8d5aad01b98f.1571881805.313156504023423731@ip-172-31-46-183.us-west-2.compute.internal>
+  To: baz@test.com, foo@bar
+  
+  changeset 8d5aad01b98f
   diffs (12 lines):
   
-  diff -r b86bc16ff894 -r e81040e9838c f1
+  diff -r 22c4495f3535 -r 8d5aad01b98f f1
   --- a/f1	Thu Jan 01 00:00:00 1970 +0000
   +++ b/f1	Thu Jan 01 00:00:00 1970 +0000
   @@ -2,6 +2,6 @@ int main() {

test-obsolete-bundle-strip.t

test-push-cgi.t

--- /hgwork/src/tests/test-push-cgi.t
+++ /hgwork/src/tests/test-push-cgi.t.err
@@ -39,57 +39,776 @@
 
   $ QUERY_STRING="cmd=unbundle&heads=0000000000000000000000000000000000000000"; export QUERY_STRING
   $ "$PYTHON" hgweb.cgi <bundle.hg >page1 2>&1
+  [1]
   $ cat page1
-  Status: 200 Script output follows
 (esc)
-  Content-Type: application/mercurial-0.1
 (esc)
-  Content-Length: 64
 (esc)
-  
 (esc)
-  0
-  repository changed while preparing changes - please try again
+  <!--: spam
+  Content-Type: text/html
+  
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
+  </font> </font> </font> </script> </object> </blockquote> </pre>
+  </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
+  <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
+  <tr bgcolor="#6622aa">
+  <td valign=bottom>&nbsp;<br>
+  <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  ><td align=right valign=bottom
+  ><font color="#ffffff" face="helvetica, arial">Python 3.5.7: /hgdev/pyenv/versions/3.5.7/bin/python3.5<br>Thu Oct 24 01:55:05 2019</font></td></tr></table>
+      
+  <p>A problem occurred in a Python script.  Here is the sequence of
+  function calls leading up to the error, in the order they occurred.</p>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:/*/$TESTTMP/r/hgweb.cgi">$TESTTMP/r/hgweb.cgi</a> in <strong><module></strong>()</td></tr> (glob)
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;2</small>&nbsp;cgitb.enable()<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;3</small>&nbsp;from&nbsp;mercurial&nbsp;import&nbsp;demandimport;&nbsp;demandimport.enable()<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;&nbsp;4</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;hgweb<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;5</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;wsgicgi<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;6</small>&nbsp;application&nbsp;=&nbsp;hgweb(b'.',&nbsp;b'test&nbsp;repository')<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">mercurial <em>undefined</em>, hgweb <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.hgweb', loader=&lt;_froz...ts.bi4ppc_z/install/lib/python/mercurial/hgweb']), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;import&nbsp;os<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;from&nbsp;..i18n&nbsp;import&nbsp;_<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;15</small>&nbsp;from&nbsp;..&nbsp;import&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">_ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.i18n', loader=&lt;_froze...s.bi4ppc_z/install/lib/python/mercurial/i18n.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;113</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;114</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;115</small>&nbsp;if&nbsp;_plain():<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;=&nbsp;lambda&nbsp;message:&nbsp;message<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;else:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>_plain</strong>&nbsp;= &lt;function _plain&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong>_plain</strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;105</small>&nbsp;def&nbsp;_plain():<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;106</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;107</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b'HGPLAIN'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;108</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;b'HGPLAINEXCEPT'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;109</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;):<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>encoding</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, encoding.environ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, attr='environ')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.encoding', loader=&lt;_f...4ppc_z/install/lib/python/mercurial/encoding.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;21</small>&nbsp;from&nbsp;.pure&nbsp;import&nbsp;charencode&nbsp;as&nbsp;charencodepure<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;22</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;23</small>&nbsp;charencode&nbsp;=&nbsp;policy.importmod(r'charencode')<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;24</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;25</small>&nbsp;isasciistr&nbsp;=&nbsp;charencode.isasciistr<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">charencode <em>undefined</em>, <strong>policy</strong>&nbsp;= &lt;module 'mercurial.policy' from '/hgwork/tmp/hgt...bi4ppc_z/install/lib/python/mercurial/policy.py'&gt;, policy.<strong>importmod</strong>&nbsp;= &lt;function importmod&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>importmod</strong>(modname='charencode')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod&nbsp;=&nbsp;_importfrom(pn,&nbsp;mn)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;pn&nbsp;==&nbsp;verpkg:<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;118</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_checkmod(pn,&nbsp;mn,&nbsp;mod)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;119</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;mod<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>_checkmod</strong>&nbsp;= &lt;function _checkmod&gt;, <strong>pn</strong>&nbsp;= 'cext', <strong>mn</strong>&nbsp;= 'parsers', <strong>mod</strong>&nbsp;= &lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>_checkmod</strong>(pkgname='cext', modname='parsers', mod=&lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;)</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;100</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'cannot&nbsp;import&nbsp;module&nbsp;%s.%s&nbsp;'<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;101</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'(expected&nbsp;version:&nbsp;%d,&nbsp;actual:&nbsp;%r)'<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;102</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;(pkgname,&nbsp;modname,&nbsp;expected,&nbsp;actual)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;103</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;104</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
+  ('cannot import module cext.parsers (expected version: 13, actual: None)',)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>msg&nbsp;=
+  'cannot import module cext.parsers (expected version: 13, actual: None)'
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>name&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>path&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>with_traceback&nbsp;=
+  &lt;built-in method with_traceback of ImportError object&gt;
+  
+  
+  <!-- The above is a description of an error in a Python program, formatted
+       for a Web browser because the 'cgitb' module was enabled.  In case you
+       are not reading this in a Web browser, here is the original traceback:
+  
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 4, in &lt;module&gt;
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in &lt;module&gt;
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in &lt;module&gt;
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in &lt;module&gt;
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  
+  -->
+  
 
 successful force push
 
   $ QUERY_STRING="cmd=unbundle&heads=666f726365"; export QUERY_STRING
   $ "$PYTHON" hgweb.cgi <bundle.hg >page2 2>&1
+  [1]
   $ cat page2
-  Status: 200 Script output follows
 (esc)
-  Content-Type: application/mercurial-0.1
 (esc)
-  Content-Length: 102
 (esc)
-  
 (esc)
-  1
-  adding changesets
-  adding manifests
-  adding file changes
-  added 0 changesets with 0 changes to 1 files
+  <!--: spam
+  Content-Type: text/html
+  
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
+  </font> </font> </font> </script> </object> </blockquote> </pre>
+  </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
+  <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
+  <tr bgcolor="#6622aa">
+  <td valign=bottom>&nbsp;<br>
+  <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  ><td align=right valign=bottom
+  ><font color="#ffffff" face="helvetica, arial">Python 3.5.7: /hgdev/pyenv/versions/3.5.7/bin/python3.5<br>Thu Oct 24 01:55:05 2019</font></td></tr></table>
+      
+  <p>A problem occurred in a Python script.  Here is the sequence of
+  function calls leading up to the error, in the order they occurred.</p>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:/*/$TESTTMP/r/hgweb.cgi">$TESTTMP/r/hgweb.cgi</a> in <strong><module></strong>()</td></tr> (glob)
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;2</small>&nbsp;cgitb.enable()<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;3</small>&nbsp;from&nbsp;mercurial&nbsp;import&nbsp;demandimport;&nbsp;demandimport.enable()<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;&nbsp;4</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;hgweb<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;5</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;wsgicgi<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;6</small>&nbsp;application&nbsp;=&nbsp;hgweb(b'.',&nbsp;b'test&nbsp;repository')<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">mercurial <em>undefined</em>, hgweb <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.hgweb', loader=&lt;_froz...ts.bi4ppc_z/install/lib/python/mercurial/hgweb']), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;import&nbsp;os<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;from&nbsp;..i18n&nbsp;import&nbsp;_<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;15</small>&nbsp;from&nbsp;..&nbsp;import&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">_ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.i18n', loader=&lt;_froze...s.bi4ppc_z/install/lib/python/mercurial/i18n.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;113</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;114</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;115</small>&nbsp;if&nbsp;_plain():<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;=&nbsp;lambda&nbsp;message:&nbsp;message<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;else:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>_plain</strong>&nbsp;= &lt;function _plain&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong>_plain</strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;105</small>&nbsp;def&nbsp;_plain():<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;106</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;107</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b'HGPLAIN'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;108</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;b'HGPLAINEXCEPT'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;109</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;):<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>encoding</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, encoding.environ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, attr='environ')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.encoding', loader=&lt;_f...4ppc_z/install/lib/python/mercurial/encoding.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;21</small>&nbsp;from&nbsp;.pure&nbsp;import&nbsp;charencode&nbsp;as&nbsp;charencodepure<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;22</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;23</small>&nbsp;charencode&nbsp;=&nbsp;policy.importmod(r'charencode')<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;24</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;25</small>&nbsp;isasciistr&nbsp;=&nbsp;charencode.isasciistr<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">charencode <em>undefined</em>, <strong>policy</strong>&nbsp;= &lt;module 'mercurial.policy' from '/hgwork/tmp/hgt...bi4ppc_z/install/lib/python/mercurial/policy.py'&gt;, policy.<strong>importmod</strong>&nbsp;= &lt;function importmod&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>importmod</strong>(modname='charencode')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod&nbsp;=&nbsp;_importfrom(pn,&nbsp;mn)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;pn&nbsp;==&nbsp;verpkg:<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;118</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_checkmod(pn,&nbsp;mn,&nbsp;mod)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;119</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;mod<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>_checkmod</strong>&nbsp;= &lt;function _checkmod&gt;, <strong>pn</strong>&nbsp;= 'cext', <strong>mn</strong>&nbsp;= 'parsers', <strong>mod</strong>&nbsp;= &lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>_checkmod</strong>(pkgname='cext', modname='parsers', mod=&lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;)</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;100</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'cannot&nbsp;import&nbsp;module&nbsp;%s.%s&nbsp;'<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;101</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'(expected&nbsp;version:&nbsp;%d,&nbsp;actual:&nbsp;%r)'<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;102</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;(pkgname,&nbsp;modname,&nbsp;expected,&nbsp;actual)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;103</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;104</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
+  ('cannot import module cext.parsers (expected version: 13, actual: None)',)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>msg&nbsp;=
+  'cannot import module cext.parsers (expected version: 13, actual: None)'
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>name&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>path&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>with_traceback&nbsp;=
+  &lt;built-in method with_traceback of ImportError object&gt;
+  
+  
+  <!-- The above is a description of an error in a Python program, formatted
+       for a Web browser because the 'cgitb' module was enabled.  In case you
+       are not reading this in a Web browser, here is the original traceback:
+  
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 4, in &lt;module&gt;
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in &lt;module&gt;
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in &lt;module&gt;
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in &lt;module&gt;
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  
+  -->
+  
 
 successful push, list of heads
 
   $ QUERY_STRING="cmd=unbundle&heads=f7b1eb17ad24730a1651fccd46c43826d1bbc2ac"; export QUERY_STRING
   $ "$PYTHON" hgweb.cgi <bundle.hg >page3 2>&1
+  [1]
   $ cat page3
-  Status: 200 Script output follows
 (esc)
-  Content-Type: application/mercurial-0.1
 (esc)
-  Content-Length: 102
 (esc)
-  
 (esc)
-  1
-  adding changesets
-  adding manifests
-  adding file changes
-  added 0 changesets with 0 changes to 1 files
+  <!--: spam
+  Content-Type: text/html
+  
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
+  </font> </font> </font> </script> </object> </blockquote> </pre>
+  </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
+  <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
+  <tr bgcolor="#6622aa">
+  <td valign=bottom>&nbsp;<br>
+  <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  ><td align=right valign=bottom
+  ><font color="#ffffff" face="helvetica, arial">Python 3.5.7: /hgdev/pyenv/versions/3.5.7/bin/python3.5<br>Thu Oct 24 01:55:06 2019</font></td></tr></table>
+      
+  <p>A problem occurred in a Python script.  Here is the sequence of
+  function calls leading up to the error, in the order they occurred.</p>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:/*/$TESTTMP/r/hgweb.cgi">$TESTTMP/r/hgweb.cgi</a> in <strong><module></strong>()</td></tr> (glob)
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;2</small>&nbsp;cgitb.enable()<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;3</small>&nbsp;from&nbsp;mercurial&nbsp;import&nbsp;demandimport;&nbsp;demandimport.enable()<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;&nbsp;4</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;hgweb<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;5</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;wsgicgi<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;6</small>&nbsp;application&nbsp;=&nbsp;hgweb(b'.',&nbsp;b'test&nbsp;repository')<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">mercurial <em>undefined</em>, hgweb <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.hgweb', loader=&lt;_froz...ts.bi4ppc_z/install/lib/python/mercurial/hgweb']), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;import&nbsp;os<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;from&nbsp;..i18n&nbsp;import&nbsp;_<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;15</small>&nbsp;from&nbsp;..&nbsp;import&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">_ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.i18n', loader=&lt;_froze...s.bi4ppc_z/install/lib/python/mercurial/i18n.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;113</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;114</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;115</small>&nbsp;if&nbsp;_plain():<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;=&nbsp;lambda&nbsp;message:&nbsp;message<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;else:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>_plain</strong>&nbsp;= &lt;function _plain&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong>_plain</strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;105</small>&nbsp;def&nbsp;_plain():<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;106</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;107</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b'HGPLAIN'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;108</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;b'HGPLAINEXCEPT'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;109</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;):<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>encoding</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, encoding.environ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, attr='environ')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.encoding', loader=&lt;_f...4ppc_z/install/lib/python/mercurial/encoding.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;21</small>&nbsp;from&nbsp;.pure&nbsp;import&nbsp;charencode&nbsp;as&nbsp;charencodepure<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;22</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;23</small>&nbsp;charencode&nbsp;=&nbsp;policy.importmod(r'charencode')<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;24</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;25</small>&nbsp;isasciistr&nbsp;=&nbsp;charencode.isasciistr<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">charencode <em>undefined</em>, <strong>policy</strong>&nbsp;= &lt;module 'mercurial.policy' from '/hgwork/tmp/hgt...bi4ppc_z/install/lib/python/mercurial/policy.py'&gt;, policy.<strong>importmod</strong>&nbsp;= &lt;function importmod&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>importmod</strong>(modname='charencode')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod&nbsp;=&nbsp;_importfrom(pn,&nbsp;mn)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;pn&nbsp;==&nbsp;verpkg:<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;118</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_checkmod(pn,&nbsp;mn,&nbsp;mod)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;119</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;mod<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>_checkmod</strong>&nbsp;= &lt;function _checkmod&gt;, <strong>pn</strong>&nbsp;= 'cext', <strong>mn</strong>&nbsp;= 'parsers', <strong>mod</strong>&nbsp;= &lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>_checkmod</strong>(pkgname='cext', modname='parsers', mod=&lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;)</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;100</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'cannot&nbsp;import&nbsp;module&nbsp;%s.%s&nbsp;'<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;101</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'(expected&nbsp;version:&nbsp;%d,&nbsp;actual:&nbsp;%r)'<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;102</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;(pkgname,&nbsp;modname,&nbsp;expected,&nbsp;actual)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;103</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;104</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
+  ('cannot import module cext.parsers (expected version: 13, actual: None)',)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>msg&nbsp;=
+  'cannot import module cext.parsers (expected version: 13, actual: None)'
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>name&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>path&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>with_traceback&nbsp;=
+  &lt;built-in method with_traceback of ImportError object&gt;
+  
+  
+  <!-- The above is a description of an error in a Python program, formatted
+       for a Web browser because the 'cgitb' module was enabled.  In case you
+       are not reading this in a Web browser, here is the original traceback:
+  
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 4, in &lt;module&gt;
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in &lt;module&gt;
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in &lt;module&gt;
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in &lt;module&gt;
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  
+  -->
+  
 
 successful push, SHA1 hash of heads (unbundlehash capability)
 
   $ QUERY_STRING="cmd=unbundle&heads=686173686564 5a785a5f9e0d433b88ed862b206b011b0c3a9d13"; export QUERY_STRING
   $ "$PYTHON" hgweb.cgi <bundle.hg >page4 2>&1
+  [1]
   $ cat page4
-  Status: 200 Script output follows
 (esc)
-  Content-Type: application/mercurial-0.1
 (esc)
-  Content-Length: 102
 (esc)
-  
 (esc)
-  1
-  adding changesets
-  adding manifests
-  adding file changes
-  added 0 changesets with 0 changes to 1 files
+  <!--: spam
+  Content-Type: text/html
+  
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
+  <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
+  </font> </font> </font> </script> </object> </blockquote> </pre>
+  </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
+  <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
+  <tr bgcolor="#6622aa">
+  <td valign=bottom>&nbsp;<br>
+  <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ImportError</strong></big></big></font></td
+  ><td align=right valign=bottom
+  ><font color="#ffffff" face="helvetica, arial">Python 3.5.7: /hgdev/pyenv/versions/3.5.7/bin/python3.5<br>Thu Oct 24 01:55:06 2019</font></td></tr></table>
+      
+  <p>A problem occurred in a Python script.  Here is the sequence of
+  function calls leading up to the error, in the order they occurred.</p>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:/*/$TESTTMP/r/hgweb.cgi">$TESTTMP/r/hgweb.cgi</a> in <strong><module></strong>()</td></tr> (glob)
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;2</small>&nbsp;cgitb.enable()<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;3</small>&nbsp;from&nbsp;mercurial&nbsp;import&nbsp;demandimport;&nbsp;demandimport.enable()<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;&nbsp;4</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;hgweb<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;5</small>&nbsp;from&nbsp;mercurial.hgweb&nbsp;import&nbsp;wsgicgi<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;&nbsp;6</small>&nbsp;application&nbsp;=&nbsp;hgweb(b'.',&nbsp;b'test&nbsp;repository')<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">mercurial <em>undefined</em>, hgweb <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.hgweb' from '/hgwork/tmp/hgte.../install/lib/python/mercurial/hgweb/__init__.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.hgweb', loader=&lt;_froz...ts.bi4ppc_z/install/lib/python/mercurial/hgweb']), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;import&nbsp;os<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;from&nbsp;..i18n&nbsp;import&nbsp;_<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;15</small>&nbsp;from&nbsp;..&nbsp;import&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">_ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, attr='__path__')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.i18n' from '/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.i18n', loader=&lt;_froze...s.bi4ppc_z/install/lib/python/mercurial/i18n.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;113</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;114</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;115</small>&nbsp;if&nbsp;_plain():<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;=&nbsp;lambda&nbsp;message:&nbsp;message<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;else:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>_plain</strong>&nbsp;= &lt;function _plain&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py</a> in <strong>_plain</strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;105</small>&nbsp;def&nbsp;_plain():<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;106</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;107</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b'HGPLAIN'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;108</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;b'HGPLAINEXCEPT'&nbsp;not&nbsp;in&nbsp;encoding.environ<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;109</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;):<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>encoding</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, encoding.environ <em>undefined</em></font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py">/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py</a> in <strong>__getattribute__</strong>(self=&lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, attr='environ')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;235</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;id(attrs_now[key])&nbsp;!=&nbsp;id(attrs_then[key]):<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;236</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attrs_updated[key]&nbsp;=&nbsp;value<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;237</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.__spec__.loader.exec_module(self)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;238</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;If&nbsp;exec_module()&nbsp;was&nbsp;used&nbsp;directly&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;the&nbsp;module<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;239</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;object&nbsp;was&nbsp;put&nbsp;into&nbsp;sys.modules.<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>self</strong>&nbsp;= &lt;module 'mercurial.encoding' from '/hgwork/tmp/h...4ppc_z/install/lib/python/mercurial/encoding.py'&gt;, self.<strong>__spec__</strong>&nbsp;= ModuleSpec(name='mercurial.encoding', loader=&lt;_f...4ppc_z/install/lib/python/mercurial/encoding.py'), self.__spec__.<strong>loader</strong>&nbsp;= &lt;_frozen_importlib_external.SourceFileLoader object&gt;, self.__spec__.loader.<strong>exec_module</strong>&nbsp;= &lt;bound method _LoaderBasics.exec_module of &lt;_frozen_importlib_external.SourceFileLoader object&gt;&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py</a> in <strong><module></strong>()</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;21</small>&nbsp;from&nbsp;.pure&nbsp;import&nbsp;charencode&nbsp;as&nbsp;charencodepure<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;22</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;23</small>&nbsp;charencode&nbsp;=&nbsp;policy.importmod(r'charencode')<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;24</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;25</small>&nbsp;isasciistr&nbsp;=&nbsp;charencode.isasciistr<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090">charencode <em>undefined</em>, <strong>policy</strong>&nbsp;= &lt;module 'mercurial.policy' from '/hgwork/tmp/hgt...bi4ppc_z/install/lib/python/mercurial/policy.py'&gt;, policy.<strong>importmod</strong>&nbsp;= &lt;function importmod&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>importmod</strong>(modname='charencode')</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;116</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod&nbsp;=&nbsp;_importfrom(pn,&nbsp;mn)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;117</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;pn&nbsp;==&nbsp;verpkg:<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;118</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_checkmod(pn,&nbsp;mn,&nbsp;mod)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;119</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;mod<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;120</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except&nbsp;ImportError:<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><em>global</em> <strong>_checkmod</strong>&nbsp;= &lt;function _checkmod&gt;, <strong>pn</strong>&nbsp;= 'cext', <strong>mn</strong>&nbsp;= 'parsers', <strong>mod</strong>&nbsp;= &lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;</font></small></td></tr></table>
+  <table width="100%" cellspacing=0 cellpadding=0 border=0>
+  <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py">/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py</a> in <strong>_checkmod</strong>(pkgname='cext', modname='parsers', mod=&lt;module 'mercurial.cext.parsers' from '/hgwork/t...al/cext/parsers.cpython-35m-x86_64-linux-gnu.so'&gt;)</td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;100</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'cannot&nbsp;import&nbsp;module&nbsp;%s.%s&nbsp;'<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;101</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r'(expected&nbsp;version:&nbsp;%d,&nbsp;actual:&nbsp;%r)'<br>
+  </tt></font></td></tr>
+  <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;102</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;(pkgname,&nbsp;modname,&nbsp;expected,&nbsp;actual)<br>
+  </tt></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;103</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br>
+  </tt></font></td></tr>
+  <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;104</small>&nbsp;<br>
+  </tt></font></td></tr>
+  <tr><td><small><font color="#909090"><strong>pkgname</strong>&nbsp;= 'cext', <strong>modname</strong>&nbsp;= 'parsers', <strong>expected</strong>&nbsp;= 13, <strong>actual</strong>&nbsp;= None</font></small></td></tr></table><p><strong>ImportError</strong>: cannot import module cext.parsers (expected version: 13, actual: None)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
+  ('cannot import module cext.parsers (expected version: 13, actual: None)',)
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>msg&nbsp;=
+  'cannot import module cext.parsers (expected version: 13, actual: None)'
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>name&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>path&nbsp;=
+  None
+  <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>with_traceback&nbsp;=
+  &lt;built-in method with_traceback of ImportError object&gt;
+  
+  
+  <!-- The above is a description of an error in a Python program, formatted
+       for a Web browser because the 'cgitb' module was enabled.  In case you
+       are not reading this in a Web browser, here is the original traceback:
+  
+  Traceback (most recent call last):
+    File "hgweb.cgi", line 4, in &lt;module&gt;
+      from mercurial.hgweb import hgweb
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/hgweb/__init__.py", line 13, in &lt;module&gt;
+      from ..i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in &lt;module&gt;
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in &lt;module&gt;
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  
+  -->
+  
 
   $ cd ..

test-revset.t

test-ssh-bundle1.t#sshv1

--- /hgwork/src/tests/test-ssh-bundle1.t
+++ /hgwork/src/tests/test-ssh-bundle1.t#sshv1.err
@@ -383,21 +383,123 @@
   > EOF
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
-  73649e48688a
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
-  remote: Illegal repository "$TESTTMP/a'repo"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
-  remote: Illegal command "hacking -R 'a'''repo' serve --stdio"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh"
-  Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation
-  [255]
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+      dispatch.initstdio()
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+      from .i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 Test hg-ssh in read-only mode:
 
@@ -411,27 +513,44 @@
   > EOF
 
   $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
-  requesting all changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 6 changesets with 5 changes to 4 files (+1 heads)
-  new changesets 1160648e36ce:1383141674ec
-  updating to branch default
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ cd read-only-local
+  $TESTTMP.sh: 214: cd: can't cd to read-only-local
+  [2]
   $ echo "baz" > bar
   $ hg ci -A -m "unpushable commit" bar
   $ hg push --ssh "sh ../ssh.sh"
-  pushing to ssh://user@dummy/*/remote (glob)
-  searching for changes
-  remote: Permission denied
-  remote: abort: pretxnopen.hg-ssh hook failed
-  remote: Permission denied
-  remote: pushkey-abort: prepushkey.hg-ssh hook failed
-  updating 6c0482d977a3 to public failed!
-  [1]
+  abort: default repository not configured!
+  (see 'hg help config.paths')
+  [255]
 
   $ cd $TESTTMP
 

test-ssh-bundle1.t#sshv2

--- /hgwork/src/tests/test-ssh-bundle1.t
+++ /hgwork/src/tests/test-ssh-bundle1.t#sshv2.err
@@ -383,21 +383,123 @@
   > EOF
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
-  73649e48688a
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
-  remote: Illegal repository "$TESTTMP/a'repo"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
-  remote: Illegal command "hacking -R 'a'''repo' serve --stdio"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh"
-  Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation
-  [255]
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+      dispatch.initstdio()
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+      from .i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 Test hg-ssh in read-only mode:
 
@@ -411,27 +513,44 @@
   > EOF
 
   $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
-  requesting all changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 6 changesets with 5 changes to 4 files (+1 heads)
-  new changesets 1160648e36ce:1383141674ec
-  updating to branch default
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ cd read-only-local
+  $TESTTMP.sh: 220: cd: can't cd to read-only-local
+  [2]
   $ echo "baz" > bar
   $ hg ci -A -m "unpushable commit" bar
   $ hg push --ssh "sh ../ssh.sh"
-  pushing to ssh://user@dummy/*/remote (glob)
-  searching for changes
-  remote: Permission denied
-  remote: abort: pretxnopen.hg-ssh hook failed
-  remote: Permission denied
-  remote: pushkey-abort: prepushkey.hg-ssh hook failed
-  updating 6c0482d977a3 to public failed!
-  [1]
+  abort: default repository not configured!
+  (see 'hg help config.paths')
+  [255]
 
   $ cd $TESTTMP
 

test-ssh.t#sshv1

--- /hgwork/src/tests/test-ssh.t
+++ /hgwork/src/tests/test-ssh.t#sshv1.err
@@ -412,21 +412,123 @@
   > EOF
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
-  73649e48688a
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
-  remote: Illegal repository "$TESTTMP/a'repo"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
-  remote: Illegal command "hacking -R 'a'''repo' serve --stdio"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh"
-  Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
-  [255]
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+      dispatch.initstdio()
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+      from .i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 Test hg-ssh in read-only mode:
 
@@ -440,24 +542,43 @@
   > EOF
 
   $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
-  requesting all changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 6 changesets with 5 changes to 4 files (+1 heads)
-  new changesets 1160648e36ce:1383141674ec
-  updating to branch default
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ cd read-only-local
+  $TESTTMP.sh: 224: cd: can't cd to read-only-local
+  [2]
   $ echo "baz" > bar
   $ hg ci -A -m "unpushable commit" bar
   $ hg push --ssh "sh ../ssh.sh"
-  pushing to ssh://user@dummy/*/remote (glob)
-  searching for changes
-  remote: Permission denied
-  remote: pretxnopen.hg-ssh hook failed
-  abort: push failed on remote
+  abort: default repository not configured!
+  (see 'hg help config.paths')
   [255]
 
   $ cd $TESTTMP

test-ssh.t#sshv2

--- /hgwork/src/tests/test-ssh.t
+++ /hgwork/src/tests/test-ssh.t#sshv2.err
@@ -412,21 +412,123 @@
   > EOF
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
-  73649e48688a
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
-  remote: Illegal repository "$TESTTMP/a'repo"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
-  remote: Illegal command "hacking -R 'a'''repo' serve --stdio"
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
   abort: no suitable response from remote hg!
   [255]
 
   $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh"
-  Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
-  [255]
+  Traceback (most recent call last):
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+      main()
+    File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+      dispatch.initstdio()
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+      from .i18n import _
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+      if _plain():
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+      b'HGPLAIN' not in encoding.environ
+    File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+      self.__spec__.loader.exec_module(self)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+      charencode = policy.importmod(r'charencode')
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+      _checkmod(pn, mn, mod)
+    File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+      % (pkgname, modname, expected, actual)
+  ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  [1]
 
 Test hg-ssh in read-only mode:
 
@@ -440,24 +542,43 @@
   > EOF
 
   $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
-  requesting all changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 6 changesets with 5 changes to 4 files (+1 heads)
-  new changesets 1160648e36ce:1383141674ec
-  updating to branch default
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  remote: Traceback (most recent call last):
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 97, in <module>
+  remote:     main()
+  remote:   File "/hgwork/src/tests/../contrib/hg-ssh", line 48, in main
+  remote:     dispatch.initstdio()
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "<frozen importlib._bootstrap_external>", line 697, in exec_module
+  remote:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/dispatch.py", line 22, in <module>
+  remote:     from .i18n import _
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 115, in <module>
+  remote:     if _plain():
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/i18n.py", line 107, in _plain
+  remote:     b'HGPLAIN' not in encoding.environ
+  remote:   File "/hgdev/pyenv/versions/3.5.7/lib/python3.5/importlib/util.py", line 237, in __getattribute__
+  remote:     self.__spec__.loader.exec_module(self)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/encoding.py", line 23, in <module>
+  remote:     charencode = policy.importmod(r'charencode')
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 118, in importmod
+  remote:     _checkmod(pn, mn, mod)
+  remote:   File "/hgwork/tmp/hgtests.bi4ppc_z/install/lib/python/mercurial/policy.py", line 102, in _checkmod
+  remote:     % (pkgname, modname, expected, actual)
+  remote: ImportError: cannot import module cext.parsers (expected version: 13, actual: None)
+  abort: no suitable response from remote hg!
+  [255]
 
   $ cd read-only-local
+  $TESTTMP.sh: 230: cd: can't cd to read-only-local
+  [2]
   $ echo "baz" > bar
   $ hg ci -A -m "unpushable commit" bar
   $ hg push --ssh "sh ../ssh.sh"
-  pushing to ssh://user@dummy/*/remote (glob)
-  searching for changes
-  remote: Permission denied
-  remote: pretxnopen.hg-ssh hook failed
-  abort: push failed on remote
+  abort: default repository not configured!
+  (see 'hg help config.paths')
   [255]
 
   $ cd $TESTTMP

Skipped Tests

Long Tests

DurationTest
281.0stest-merge-combination.t
215.7stest-revset.t
193.3stest-obsolete-bundle-strip.t
184.7stest-bookmarks-pushpull.t#b2-binary
183.5stest-bookmarks-pushpull.t#b2-pushkey
177.5stest-subrepo.t
169.2stest-obsolete.t
161.8stest-log.t
159.9stest-template-functions.t
157.0stest-graft.t#abortflag
156.9stest-graft.t#abortcommand
145.1stest-mq.t
138.9stest-glog.t
138.5stest-glog-beautifygraph.t
136.1stest-import.t
134.8stest-rebase-obsolete.t
134.8stest-largefiles.t
132.6stest-obsmarker-template.t
129.3stest-merge-tools.t
120.8stest-largefiles-misc.t
111.0stest-fix.t
110.5stest-commit-amend.t
109.9stest-update-branches.t
109.8stest-bundle2-exchange.t#sshv2
109.6stest-rename-merge2.t
109.6stest-bundle2-exchange.t#sshv1
109.1stest-shelve.t#stripbased
108.4stest-shelve.t#phasebased
107.3stest-revset2.t
103.9stest-bookmarks.t
101.5stest-strip.t
101.4stest-copies.t#compatibility
101.1stest-copies.t#changeset
101.0stest-copies.t#sidedata
101.0stest-copies.t#filelog
98.3stest-merge-force.t
97.7stest-shelve2.t#phasebased#abortcommand#continuecommand
97.7stest-shelve2.t#phasebased#abortflag#continueflag
97.2stest-shelve2.t#phasebased#abortflag#continuecommand
97.2stest-shelve2.t#phasebased#abortcommand#continueflag
95.5stest-http-permissions.t
95.5stest-subrepo-git.t
94.8stest-shelve2.t#stripbased#abortcommand#continuecommand
94.5stest-shelve2.t#stripbased#abortflag#continuecommand
94.5stest-shelve2.t#stripbased#abortcommand#continueflag
94.3stest-shelve2.t#stripbased#abortflag#continueflag
94.0stest-merge-changedelete.t
93.4stest-phases-exchange.t
92.0stest-template-basic.t
90.4stest-push-warn.t
88.3stest-template-keywords.t
87.3stest-mv-cp-st-diff.t
87.1stest-obsolete-divergent.t
87.0stest-largefiles-update.t
86.7stest-revert.t
86.6stest-mq-subrepo.t
85.2stest-keyword.t
84.5stest-copytrace-heuristics.t
83.8stest-annotate.t
83.5stest-push-race.t#unrelated
81.9stest-push-race.t#strict
81.5stest-clone.t#sshv1
80.7stest-transplant.t#continueflag
80.7stest-clone.t#sshv2
80.6stest-transplant.t#commandmode
80.5stest-lfs.t
79.4stest-convert-filemap.t
78.7stest-mq-header-date.t
78.1stest-bisect.t
77.6stest-fileset.t
77.1stest-resolve.t
75.9stest-mq-header-from.t
74.0stest-narrow.t#tree#lfs-on
73.6stest-narrow.t#flat#lfs-on
71.3stest-tags.t
70.6stest-uncommit.t
70.3stest-template-map.t
70.0stest-rebase-inmemory.t
68.5stest-narrow.t#tree#lfs-off
68.2stest-narrow.t#flat#lfs-off
66.3stest-init.t
65.9stest-backout.t
65.7stest-tag.t
64.1stest-rebase-scenario-global.t
63.1stest-mq-guards.t
62.5stest-copies-unrelated.t#changeset
62.4stest-ssh-proto.t
62.2stest-copies-unrelated.t#filelog
62.2stest-copies-unrelated.t#sidedata
62.1stest-copies-unrelated.t#compatibility
62.1stest-branches.t
61.9stest-check-pylint.t
61.8stest-treemanifest.t
61.0stest-alias.t
59.5stest-subrepo-deep-nested-change.t
59.3stest-censor.t
58.1stest-rename.t
57.7stest-commit-interactive.t
57.6stest-commit.t
56.4stest-status.t
56.1stest-help.t
56.1stest-bisect2.t
56.1stest-run-tests.t
56.0stest-hook.t
54.3stest-bundle.t
53.5stest-remotefilelog-repack.t
53.4stest-histedit-fold.t
53.2stest-rebase-collapse.t
52.9stest-contrib-perf.t
51.9stest-newbranch.t
51.2stest-automv.t
50.9stest-rebase-abort.t#abortcommand#continueflag
50.8stest-rebase-abort.t#abortcommand#continuecommand
50.7stest-ssh.t#sshv1
50.4stest-extension.t
50.4stest-treediscovery.t
50.3stest-rebase-abort.t#abortflag#continueflag
50.2stest-rebase-abort.t#abortflag#continuecommand
50.0stest-ssh.t#sshv2
49.7stest-narrow-clone.t
49.2stest-obshistory.t
49.1stest-merge-no-file-change.t
48.9stest-fastannotate-hg.t
48.7stest-phases.t
48.5stest-narrow-widen-no-ellipsis.t#tree
48.5stest-mq-qpush-fail.t
48.5stest-narrow-widen-no-ellipsis.t#flat
47.5stest-narrow-widen.t#flat
47.2stest-narrow-widen.t#tree
47.2stest-remotefilelog-repack-fast.t
46.9stest-eol.t
46.7stest-acl.t
46.3stest-fetch.t
46.1stest-bheads.t
46.0stest-ssh-bundle1.t#sshv2
45.9stest-histedit-obsolete.t#abortcommand
45.9stest-ssh-bundle1.t#sshv1
45.6stest-histedit-obsolete.t#abortflag
44.9stest-convert-hg-sink.t
44.5stest-histedit-arguments.t#abortcommand
44.5stest-histedit-arguments.t#abortflag
44.3stest-archive.t
44.3stest-https.t
44.0stest-hgwebdir.t
44.0stest-bookflow.t
44.0stest-hghave.t
43.5stest-subrepo-svn.t
42.6stest-largefiles-wireproto.t#sshv2
42.5stest-walk.t
42.5stest-obsolete-distributed.t
42.3stest-largefiles-wireproto.t#sshv1
42.1stest-import-git.t
42.0stest-git-export.t
42.0stest-convert-git.t
41.9stest-absorb.t
41.4stest-mq-qnew.t
41.4stest-issue3084.t
41.2stest-remotefilelog-bgprefetch.t
41.1stest-narrow-clone-no-ellipsis.t
41.0stest-setdiscovery.t
40.7stest-merge1.t
40.3stest-sparse.t
40.2stest-remove.t
40.2stest-upgrade-repo.t
39.9stest-remotefilelog-prefetch.t
39.9stest-branch-change.t
39.6stest-split.t#obsstore-on
39.3stest-grep.t
39.0stest-rebase-cache.t
38.9stest-debugcommands.t
38.7stest-bundle-r.t
38.6stest-audit-subrepo.t
38.5stest-amend.t#obsstore-on
38.4stest-mq-qpush-exact.t
38.3stest-unamend.t
38.1stest-http-bad-server.t
37.5stest-patchbomb.t
37.3stest-histedit-edit.t
36.8stest-amend.t#obsstore-off
36.8stest-rebase-parameters.t
36.7stest-parse-date.t
36.7stest-show-work.t
36.6stest-add.t
36.6stest-rollback.t
36.4stest-rebase-dest.t
36.1stest-split.t#obsstore-off
36.1stest-narrow-shallow-merges.t
35.8stest-ssh-proto-unbundle.t
35.5stest-narrow-clone-stream.t#flat-fncache
35.3stest-narrow-clone-stream.t#flat-nofncache
35.3stest-narrow-clone-stream.t#tree
34.9stest-copies-in-changeset.t#sidedata
34.7stest-rebase-newancestor.t
34.4stest-commandserver.t
34.2stest-mq-qimport.t
33.5stest-status-color.t
33.4stest-revset-legacy-lookup.t
33.2stest-check-code.t
32.8stest-push.t
32.7stest-treediscovery-legacy.t
32.7stest-exchange-obsmarkers-case-A3.t
32.7stest-rebase-interruptions.t
32.6stest-http.t
32.5stest-infinitepush-bundlestore.t
32.5stest-subrepo-recursion.t
32.5stest-lfs-serve.t#lfsremote-on
32.5stest-convert-svn-sink.t
31.9stest-exchange-obsmarkers-case-A1.t
31.7stest-flagprocessor.t
31.4stest-githelp.t
31.3stest-check-pyflakes.t
31.1stest-rebase-pull.t
30.8stest-strip-cross.t
30.8stest-copies-in-changeset.t#extra
30.7stest-clone-uncompressed.t#stream-bundle2
30.6stest-import-bypass.t
30.6stest-mq-qrefresh.t
30.3stest-convert-cvs.t
30.3stest-rebase-mq.t
30.2stest-extdiff.t
29.9stest-narrow-shallow.t
29.9stest-narrow-share.t#tree
29.8stest-narrow-share.t#flat
29.6stest-show-stack.t
29.6stest-narrow-clone-nonlinear.t
29.2stest-revlog-mmapindex.t
29.0stest-bookmarks-current.t
28.9stest-rebase-named-branches.t
28.8stest-bundle2-remote-changegroup.t#sshv2
28.7stest-obsmarkers-effectflag.t
28.7stest-push-http.t#bundle2
28.7stest-bundle2-remote-changegroup.t#sshv1
28.6stest-dirstate-race.t
28.6stest-rebase-rename.t
28.4stest-narrow-pull.t
28.4stest-rename-merge1.t
28.2stest-bundle-phases.t
28.2stest-wireproto-exchangev2.t
28.1stest-logexchange.t
28.0stest-hgweb-commands.t
27.8stest-http-bundle1.t
27.6stest-merge-criss-cross.t
27.5stest-histedit-fold-non-commute.t
27.4stest-push-http.t#bundle1
27.0stest-copy.t
27.0stest-narrow-patterns.t
26.9stest-obsolete-checkheads.t
26.9stest-lfconvert.t
26.8stest-rebase-mq-skip.t#continuecommand
26.7stest-rebase-mq-skip.t#continueflag
26.6stest-histedit-non-commute.t
26.6stest-convert-cvs-detectmerge.t
26.4stest-bookmarks-merge.t
26.3stest-cache-abuse.t
26.3stest-rebase-bookmarks.t
26.1stest-bundle-type.t
25.7stest-remotefilelog-push-pull.t
25.7stest-clone-uncompressed.t#stream-legacy
25.6stest-diff-ignore-whitespace.t
25.6stest-generaldelta.t
25.6stest-histedit-commute.t
25.3stest-remotefilelog-local.t
24.8stest-clonebundles.t
24.4stest-url-rev.t
24.1stest-rebase-base-flag.t
24.1stest-share-bookmarks.t#vfs
24.0stest-rebase-conflicts.t
24.0stest-share-bookmarks.t#svfs
23.7stest-rename-dir-merge.t
23.7stest-fix-topology.t#obsstore-on
23.6stest-infinitepush.t
23.6stest-mq-safety.t
23.5stest-manifest.t
23.4stest-highlight.t
23.3stest-hgweb-symrev.t
23.3stest-incoming-outgoing.t
23.1stest-absorb-rename.t
22.9stest-commit-interactive-curses.t
22.9stest-audit-path.t
22.8stest-diffstat.t
22.8stest-pull-update.t
22.8stest-merge-types.t
22.7stest-single-head.t
22.7stest-mq-qrefresh-replace-log-message.t
22.6stest-rebase-emptycommit.t
22.6stest-convert-hg-source.t
22.6stest-pager.t
22.5stest-revert-interactive.t
22.3stest-rebase-detach.t
22.2stest-bundle2-format.t
22.2stest-infinitepush-ci.t
22.2stest-up-local-change.t
22.1stest-mq-qdelete.t
22.1stest-remotefilelog-linknodes.t
21.9stest-stack.t
21.9stest-globalopts.t
21.9stest-export.t
21.9stest-releasenotes-formatting.t
21.6stest-blackbox.t
21.6stest-symlinks.t
21.6stest-pull-branch.t
21.6stest-largefiles-cache.t
21.5stest-clone-r.t
21.3stest-convert-cvs-synthetic.t
21.3stest-exchange-obsmarkers-case-C3.t
21.3stest-hardlinks.t
21.1stest-fncache.t
20.9stest-copy-move-merge.t
20.8stest-hgweb.t
20.8stest-mq-qqueue.t
20.8stest-removeemptydirs.t
20.8stest-pathconflicts-merge.t
20.6stest-fix-topology.t#obsstore-off
20.6stest-paths.t
20.5stest-convert-cvs-branch.t
20.4stest-hgweb-diffs.t
20.1stest-purge.t
20.1stest-fastannotate.t
20.1stest-exchange-obsmarkers-case-D1.t

Timeline

test-contrib-check-code.t (1.65s)test-contrib-perf.t (52.92s)test-merge-combination.t (281.01s)test-obsolete-checkheads.t (26.93s)test-run-tests.t (56.07s)test-check-code.t (33.17s)test-contrib-check-commit.t (0.14s)test-imports-checker.t (1.06s)test-push-checkheads-unpushed-D3.t (11.54s)test-push-checkheads-unpushed-D4.t (12.32s)test-push-checkheads-unpushed-D5.t (11.97s)test-push-race.t#strict (81.89s)test-push-race.t#unrelated (83.47s)test-check-py3-compat.t (6.22s)test-push-checkheads-pruned-B8.t (13.37s)test-push-checkheads-superceed-A6.t (11.53s)test-push-checkheads-superceed-A7.t (11.57s)test-rebase-check-restore.t (11.80s)test-largefiles-update.t (87.02s)test-push-checkheads-pruned-B2.t (8.92s)test-push-checkheads-pruned-B3.t (8.94s)test-push-checkheads-pruned-B5.t (10.52s)test-push-checkheads-superceed-A2.t (10.21s)test-push-checkheads-superceed-A3.t (10.23s)test-push-checkheads-unpushed-D2.t (10.13s)test-push-checkheads-unpushed-D7.t (11.99s)test-push-checkheads-partial-C1.t (8.03s)test-push-checkheads-partial-C2.t (8.01s)test-push-checkheads-partial-C4.t (7.54s)test-push-checkheads-pruned-B4.t (8.40s)test-push-checkheads-unpushed-D6.t (9.60s)test-push-checkheads-partial-C3.t (7.57s)test-push-checkheads-pruned-B6.t (8.84s)test-push-checkheads-pruned-B7.t (8.74s)test-push-checkheads-superceed-A8.t (9.13s)test-push-checkheads-unpushed-D1.t (7.92s)test-subrepo-svn.t (43.50s)test-push-checkheads-superceed-A4.t (7.45s)test-push-checkheads-superceed-A5.t (7.38s)test-push-checkheads-pruned-B1.t (5.97s)test-push-checkheads-superceed-A1.t (6.38s)test-copytrace-heuristics.t (84.49s)test-check-config.t (13.40s)test-glog-beautifygraph.t (138.54s)test-gendoc-ja.t (0.28s)test-check-module-imports.t (1.87s)test-convert-cvs.t (30.34s)test-help.t (56.15s)test-obsolete-bounds-checking.t (1.72s)test-gendoc.t (0.35s)test-glog.t (138.90s)test-convert-svn-sink.t (32.45s)test-check-help.t (18.01s)test-patchbomb.t (37.47s)test-convert-svn-source.t (0.13s)test-obsolete-bundle-strip.t (193.33s)test-check-pyflakes.t (31.30s)test-abort-checkin.t (1.74s)test-http-bad-server.t (38.06s)test-ssh-proto-unbundle.t (35.81s)test-obsmarker-template.t (132.56s)test-acl.t (46.70s)test-check-commit.t (2.18s)test-check-shbang.t (2.96s)test-convert-svn-move.t (0.13s)test-check-interfaces.py (0.52s)test-hgweb-commands.t (28.04s)test-hgweb-symrev.t (23.29s)test-obsolete.t (169.15s)test-upgrade-repo.t (40.20s)test-extension.t (50.43s)test-ssh-proto.t (62.41s)test-log.t (161.76s)test-check-execute.t (2.46s)test-dirstate-race.t (28.64s)test-check-pylint.t (61.88s)test-graft.t#abortcommand (156.86s)test-graft.t#abortflag (156.98s)test-convert-svn-encoding.t (0.12s)test-wireproto-content-redirects.t (6.90s)test-hgweb-filelog.t (15.02s)test-hgwebdir.t (44.05s)test-wireproto-exchangev2.t (28.17s)test-bundle2-format.t (22.21s)test-template-map.t (70.32s)test-revset.t (215.73s)test-subrepo.t (177.48s)test-convert-cvs-detectmerge.t (26.62s)test-rebase-obsolete.t (134.82s)test-largefiles.t (134.78s)test-merge-tools.t (129.29s)test-hgweb-json.t (17.07s)test-convert-cvs-synthetic.t (21.29s)test-gendoc-ro.t (0.22s)test-import.t (136.14s)test-subrepo-deep-nested-change.t (59.49s)test-bundle2-exchange.t#sshv1 (109.60s)test-bundle2-exchange.t#sshv2 (109.81s)test-phases-exchange.t (93.38s)test-bookmarks-pushpull.t#b2-binary (184.69s)test-bookmarks-pushpull.t#b2-pushkey (183.51s)test-convert-cvsnt-mergepoints.t (13.36s)test-strip.t (101.49s)test-template-functions.t (159.94s)test-commit-interactive.t (57.69s)test-merge-changedelete.t (93.98s)test-lfs.t (80.45s)test-fix.t (110.98s)test-hook.t (56.03s)test-rename-merge2.t (109.63s)test-https.t (44.31s)test-highlight.t (23.44s)test-convert-git.t (41.97s)test-http-permissions.t (95.52s)test-lfs-test-server.t#git-server (0.27s)test-lfs-test-server.t#hg-server (18.83s)test-setdiscovery.t (40.98s)test-commandserver.t (34.39s)test-clone.t#sshv1 (81.51s)test-bookmarks.t (103.88s)test-clone.t#sshv2 (80.66s)test-check-clang-format.t (2.32s)test-merge-force.t (98.32s)test-revset2.t (107.32s)test-convert-cvs-branch.t (20.54s)test-shelve.t#phasebased (108.37s)test-shelve.t#stripbased (109.12s)test-largefiles-misc.t (120.83s)test-commit-amend.t (110.45s)test-branches.t (62.07s)test-http-protocol.t (19.65s)test-hgweb-diffs.t (20.35s)test-revert.t (86.68s)test-keyword.t (85.17s)test-template-keywords.t (88.30s)test-wireproto-command-filesdata.t (14.80s)test-convert-svn-branches.t (0.11s)test-mq.t (145.13s)test-convert-hg-svn.t (0.13s)test-gendoc-de.t (0.27s)test-lfs-serve-access.t (19.54s)test-wireproto-command-capabilities.t (7.03s)test-generaldelta.t (25.61s)test-subrepo-git.t (95.48s)test-lfs-serve.t#lfsremote-off (11.44s)test-lfs-serve.t#lfsremote-on (32.46s)test-check-format.t (0.13s)test-transplant.t#commandmode (80.63s)test-transplant.t#continueflag (80.71s)test-treemanifest.t (61.78s)test-tags.t (71.35s)test-phases.t (48.69s)test-template-basic.t (91.96s)test-tag.t (65.71s)test-subrepo-recursion.t (32.47s)test-hgweb.t (20.82s)test-convert.t (15.28s)test-check-jshint.t (0.52s)test-http-api-httpv2.t (14.57s)test-http.t (32.56s)test-convert-filemap.t (79.38s)test-obsolete-divergent.t (87.12s)test-annotate.t (83.81s)test-bundle.t (54.27s)test-resolve.t (77.06s)test-shelve2.t#phasebased#abortcommand#continuecommand (97.71s)test-shelve2.t#phasebased#abortcommand#continueflag (97.23s)test-shelve2.t#phasebased#abortflag#continuecommand (97.24s)test-shelve2.t#phasebased#abortflag#continueflag (97.65s)test-shelve2.t#stripbased#abortcommand#continuecommand (94.78s)test-shelve2.t#stripbased#abortcommand#continueflag (94.54s)test-shelve2.t#stripbased#abortflag#continuecommand (94.55s)test-shelve2.t#stripbased#abortflag#continueflag (94.35s)test-split.t#obsstore-off (36.12s)test-split.t#obsstore-on (39.62s)test-encoding-textwrap.t (5.10s)test-obsolete-distributed.t (42.51s)test-walk.t (42.52s)test-mv-cp-st-diff.t (87.35s)test-bisect.t (78.06s)test-convert-p4-filetypes.t (0.11s)test-notify.t (17.00s)test-rebase-scenario-global.t (64.14s)test-commit.t (57.63s)test-ssh.t#sshv1 (50.73s)test-ssh.t#sshv2 (50.01s)test-bundle2-remote-changegroup.t#sshv1 (28.67s)test-bundle2-remote-changegroup.t#sshv2 (28.75s)test-clonebundles.t (24.76s)test-wireproto-exchangev2-shallow.t (7.98s)test-import-git.t (42.14s)test-mq-header-from.t (75.94s)test-i18n.t (5.99s)test-treediscovery.t (50.38s)test-bisect2.t (56.07s)test-archive.t (44.32s)test-fileset.t (77.56s)test-grep.t (39.27s)test-push-warn.t (90.44s)test-hgweb-annotate-whitespace.t (7.46s)test-remotefilelog-repack.t (53.45s)test-debugcommands.t (38.93s)test-remove.t (40.22s)test-rebase-inmemory.t (69.96s)test-clone-uncompressed.t#stream-bundle2 (30.67s)test-clone-uncompressed.t#stream-legacy (25.66s)test-alias.t (61.02s)test-ssh-bundle1.t#sshv1 (45.87s)test-ssh-bundle1.t#sshv2 (46.04s)test-mq-header-date.t (78.74s)test-wireproto-command-changesetdata.t (16.89s)test-pull-pull-corruption.t (18.46s)test-blackbox.t (21.64s)test-convert-svn-startrev.t (0.13s)test-devel-warnings.t (8.50s)test-backout.t (65.89s)test-push-http.t#bundle1 (27.41s)test-push-http.t#bundle2 (28.68s)test-rebase-collapse.t (53.23s)test-contrib-relnotes.t (2.00s)test-update-branches.t (109.89s)test-audit-subrepo.t (38.59s)test-histedit-obsolete.t#abortcommand (45.91s)test-histedit-obsolete.t#abortflag (45.61s)test-histedit-arguments.t#abortcommand (44.51s)test-histedit-arguments.t#abortflag (44.51s)test-wireproto.t (16.74s)test-globalopts.t (21.93s)test-http-bundle1.t (27.80s)test-hgweb-descend-empties.t (3.08s)test-obshistory.t (49.18s)test-fncache.t (21.06s)test-rename.t (58.06s)test-uncommit.t (70.60s)test-mq-subrepo.t (86.62s)test-fastannotate-hg.t (48.88s)test-histedit-fold.t (53.41s)test-progress.t (10.03s)test-remotefilelog-repack-fast.t (47.22s)test-log-linerange.t (16.00s)test-extdiff.t (30.22s)test-getbundle.t (10.81s)test-largefiles-wireproto.t#sshv1 (42.27s)test-largefiles-wireproto.t#sshv2 (42.60s)test-status-color.t (33.51s)test-narrow.t#flat#lfs-off (68.23s)test-narrow.t#flat#lfs-on (73.57s)test-narrow.t#tree#lfs-off (68.50s)test-narrow.t#tree#lfs-on (74.03s)test-convert-hg-sink.t (44.88s)test-logexchange.t (28.11s)test-merge-types.t (22.77s)test-histedit-commute.t (25.58s)test-censor.t (59.30s)test-lfconvert.t (26.91s)test-histedit-edit.t (37.32s)test-remotefilelog-bgprefetch.t (41.16s)test-fetch.t (46.33s)test-copies.t#changeset (101.14s)test-copies.t#compatibility (101.37s)test-copies.t#filelog (101.00s)test-copies.t#sidedata (101.05s)test-wireproto-caching.t (9.55s)test-amend.t#obsstore-off (36.78s)test-amend.t#obsstore-on (38.52s)test-incoming-outgoing.t (23.29s)test-clone-pull-corruption.t (9.49s)test-eol.t (46.94s)test-rollback.t (36.60s)test-install.t (6.23s)test-newbranch.t (51.92s)test-bundle2-multiple-changegroups.t (12.17s)test-merge-criss-cross.t (27.62s)test-wireproto-command-manifestdata.t (10.21s)test-git-export.t (41.99s)test-infinitepush-ci.t (22.19s)test-status.t (56.35s)test-diff-color.t (12.50s)test-rebase-abort.t#abortcommand#continuecommand (50.81s)test-rebase-abort.t#abortcommand#continueflag (50.86s)test-rebase-abort.t#abortflag#continuecommand (50.24s)test-rebase-abort.t#abortflag#continueflag (50.30s)test-lfs-largefiles.t (19.83s)test-hgweb-empty.t (2.61s)test-dirstate-race2.t (3.44s)test-merge1.t (40.74s)test-infinitepush-bundlestore.t (32.48s)test-rebase-conflicts.t (24.03s)test-push.t (32.76s)test-rebase-newancestor.t (34.66s)test-convert-mtn.t (0.11s)test-copies-in-changeset.t#extra (30.77s)test-copies-in-changeset.t#sidedata (34.93s)test-narrow-shallow-merges.t (36.06s)test-mq-guards.t (63.13s)test-hghave.t (43.95s)test-convert-svn-tags.t (0.12s)test-pager.t (22.56s)test-completion.t (11.86s)test-wireproto-command-filedata.t (12.79s)test-qrecord.t (11.52s)test-mq-subrepo-svn.t (3.60s)test-revset-legacy-lookup.t (33.44s)test-copies-unrelated.t#changeset (62.54s)test-copies-unrelated.t#compatibility (62.12s)test-copies-unrelated.t#filelog (62.25s)test-copies-unrelated.t#sidedata (62.19s)test-rebase-interruptions.t (32.67s)test-absorb.t (41.92s)test-rebase-parameters.t (36.77s)test-hardlinks.t (21.28s)test-export.t (21.92s)test-issue3084.t (41.37s)test-merge-no-file-change.t (49.12s)test-verify.t (16.01s)test-narrow-patterns.t (27.00s)test-rebase-dest.t (36.37s)test-mq-qpush-fail.t (48.48s)test-narrow-widen-no-ellipsis.t#flat (48.45s)test-narrow-widen-no-ellipsis.t#tree (48.55s)test-bundle-r.t (38.67s)test-rebase-pull.t (31.09s)test-exchange-obsmarkers-case-A1.t (31.86s)test-branch-change.t (39.88s)test-sparse.t (40.30s)test-commit-interactive-curses.t (22.91s)test-rebase-named-branches.t (28.87s)test-fix-topology.t#obsstore-off (20.62s)test-fix-topology.t#obsstore-on (23.69s)test-import-bypass.t (30.55s)test-revert-interactive.t (22.54s)test-parse-date.t (36.74s)test-treediscovery-legacy.t (32.73s)test-narrow-widen.t#flat (47.52s)test-narrow-widen.t#tree (47.22s)test-rebase-cache.t (39.02s)test-journal.t (13.40s)test-help-hide.t (0.86s)test-releasenotes-formatting.t (21.87s)test-mq-qrefresh.t (30.55s)test-histedit-fold-non-commute.t (27.52s)test-gendoc-pt_BR.t (0.27s)test-gendoc-zh_CN.t (0.41s)test-gendoc-zh_TW.t (0.28s)test-exchange-obsmarkers-case-A3.t (32.67s)test-mq-qrefresh-interactive.t (7.26s)test-chg.t (0.10s)test-wireproto-command-rawstorefiledata.t (5.62s)test-static-http.t (18.76s)test-histedit-non-commute.t (26.63s)test-hgignore.t (19.95s)test-githelp.t (31.45s)test-win32text.t (19.34s)test-exchange-obsmarkers-case-C3.t (21.28s)test-gendoc-it.t (0.27s)test-gendoc-el.t (0.29s)test-gendoc-fr.t (0.25s)test-gendoc-ru.t (0.28s)test-gendoc-sv.t (0.27s)test-gendoc-da.t (0.30s)test-share-bookmarks.t#svfs (24.00s)test-share-bookmarks.t#vfs (24.05s)test-mq-qnew.t (41.44s)test-bheads.t (46.13s)test-flagprocessor.t (31.74s)test-diff-ignore-whitespace.t (25.64s)test-bookflow.t (43.99s)test-http-api.t (6.48s)test-largefiles-cache.t (21.57s)test-encoding.t (12.17s)test-rebase-rename.t (28.60s)test-convert-bzr-merges.t (0.10s)test-mq-qimport.t (34.18s)test-manifest.t (23.47s)test-url-rev.t (24.39s)test-diff-unified.t (16.72s)test-mq-qrefresh-replace-log-message.t (22.70s)test-unamend.t (38.30s)test-init.t (66.28s)test-pager-legacy.t (16.09s)test-rebase-base-flag.t (24.13s)test-histedit-base.t (13.06s)test-parseindex.t (7.13s)test-clone-r.t (21.52s)test-bad-extension.t (3.61s)test-hgweb-raw.t (6.20s)test-rebase-mq.t (30.26s)test-exchange-obsmarkers-case-D1.t (20.07s)test-hgweb-removed.t (3.24s)test-eol-patch.t (12.28s)test-automv.t (51.16s)test-exchange-obsmarkers-case-C2.t (19.60s)test-single-head.t (22.74s)test-ssh-clone-r.t#sshv1 (19.70s)test-ssh-clone-r.t#sshv2 (19.71s)test-subrepo-relative-path.t (16.74s)test-hgrc.t (12.35s)test-casecollision-merge.t (0.10s)test-http-clone-r.t (16.73s)test-convert-bzr.t (0.10s)test-bookmarks-corner-case.t (12.94s)test-rename-dir-merge.t (23.72s)test-strip-cross.t (30.82s)test-add.t (36.62s)test-histedit-no-change.t (19.74s)test-narrow-clone.t (49.66s)test-diffstat.t (22.78s)test-convert-splicemap.t (19.75s)test-http-proxy.t (6.74s)test-removeemptydirs.t (20.80s)test-fileset-generated.t (11.94s)test-bundle-phases.t (28.18s)test-exchange-obsmarkers-case-C1.t (18.64s)test-status-rev.t (11.16s)test-diff-upgrade.t (8.33s)test-pull-update.t (22.78s)test-copy.t (27.01s)test-bisect3.t (15.46s)test-conflict.t (13.38s)test-remotefilelog-prefetch.t (39.91s)test-up-local-change.t (22.16s)test-dispatch.t (18.94s)test-narrow-exchange.t#lfs-off (15.37s)test-narrow-exchange.t#lfs-on (17.14s)test-obsolete-changeset-exchange.t (13.63s)test-exchange-obsmarkers-case-D4.t (16.03s)test-eol-update.t (11.39s)test-remotefilelog-push-pull.t (25.70s)test-pull-bundle.t (12.87s)test-share.t (17.20s)test-narrow-exchange-merges.t (16.86s)test-absorb-rename.t (23.10s)test-exchange-obsmarkers-case-B5.t (18.70s)test-churn.t (16.02s)test-pull-branch.t (21.58s)test-eol-hook.t (14.83s)test-bundle-type.t (26.14s)test-remotefilelog-linknodes.t (22.11s)test-narrow-trackedcmd.t#flat (15.90s)test-narrow-trackedcmd.t#tree (15.86s)test-byteify-strings.t (0.90s)test-rebase-detach.t (22.26s)test-stream-bundle-v2.t (5.83s)test-sparse-profiles.t (17.40s)test-mq-qpush-exact.t (38.44s)test-fastannotate-protocol.t (14.92s)test-hybridencode.py (0.26s)test-rebase-bookmarks.t (26.31s)test-bookmarks-current.t (29.00s)test-convert-hg-source.t (22.56s)test-notify-changegroup.t (8.04s)test-encoding-align.t (9.61s)test-debugbuilddag.t (10.88s)test-convert-baz.t (0.11s)test-inherit-mode.t (3.24s)test-infinitepush.t (23.56s)test-histedit-non-commute-abort.t (13.85s)test-releasenotes-merging.t (10.98s)test-remotefilelog-gcrepack.t (13.50s)test-convert-hg-startrev.t (16.88s)test-show-work.t (36.73s)test-narrow-strip.t#flat#lfs-off (11.12s)test-narrow-strip.t#flat#lfs-on (12.13s)test-narrow-strip.t#tree#lfs-off (11.15s)test-narrow-strip.t#tree#lfs-on (12.17s)test-repo-compengines.t (17.85s)test-merge-commit.t (13.41s)test-audit-path.t (22.85s)test-exchange-obsmarkers-case-B4.t (19.50s)test-fastannotate.t (20.08s)test-narrow-expanddirstate.t (9.19s)test-purge.t (20.15s)test-symlinks.t (21.59s)test-exchange-obsmarkers-case-C4.t (16.52s)test-sparse-revlog.t (0.10s)test-mq-safety.t (23.56s)test-directaccess.t (15.94s)test-exchange-obsmarkers-case-A6.t (17.78s)test-exchange-obsmarkers-case-A5.t (16.02s)test-remotefilelog-local.t (25.32s)test-basic.t (11.74s)test-narrow-share.t#flat (29.76s)test-narrow-share.t#tree (29.88s)test-hgweb-csp.t (8.26s)test-histedit-bookmark-motion.t (11.64s)test-obsolete-tag-cache.t (8.31s)test-diff-binary-file.t (11.18s)test-casefolding.t (0.10s)test-mq-git.t (11.24s)test-mq-qfold.t (17.74s)test-remotefilelog-cacheprocess.t (5.95s)test-patchbomb-bookmark.t (6.36s)test-stack.t (21.94s)test-journal-share.t (11.57s)test-paths.t (20.62s)test-contrib-testparseutil.t (0.36s)test-hgweb-no-request-uri.t (2.19s)test-sparse-merges.t (19.62s)test-pathconflicts-merge.t (20.76s)test-releasenotes-parsing.t (4.81s)test-diff-indent-heuristic.t#bdiff (1.31s)test-diff-indent-heuristic.t#xdiff (1.57s)test-import-merge.t (19.87s)test-drawdag.t (15.72s)test-patchbomb-tls.t (5.02s)test-exchange-obsmarkers-case-B2.t (15.62s)test-convert-p4.t (0.10s)test-show-stack.t (29.63s)test-narrow-clone-nonlinear.t (29.62s)test-config.t (10.73s)test-mq-eol.t (10.26s)test-exchange-obsmarkers-case-A4.t (13.68s)test-convert-bzr-directories.t (0.10s)test-obsmarkers-effectflag.t (28.68s)test-rename-merge1.t (28.40s)test-fastannotate-renames.t (16.30s)test-histedit-drop.t (10.30s)test-rebase-mq-skip.t#continuecommand (26.79s)test-rebase-mq-skip.t#continueflag (26.72s)test-bookmarks-merge.t (26.39s)test-lock-badness.t (11.89s)test-repair-strip.t (9.24s)test-histedit-outgoing.t (14.41s)test-pull.t#sshv1 (11.76s)test-pull.t#sshv2 (11.69s)test-exchange-obsmarkers-case-B6.t (14.52s)test-merge-default.t (14.39s)test-extension-timing.t (1.63s)test-match.py (0.24s)test-rebase-emptycommit.t (22.63s)test-cbor.py (0.98s)test-debugbundle.t (5.80s)test-copy-move-merge.t (20.88s)test-profile.t (19.84s)test-convert-tla.t (2.03s)test-mq-qclone-http.t (19.33s)test-exchange-obsmarkers-case-A2.t (19.05s)test-exchange-obsmarkers-case-D2.t (18.93s)test-status-terse.t (17.66s)test-merge7.t (6.52s)test-phase-archived.t (7.43s)test-hgweb-no-path-info.t (2.08s)test-subrepo-missing.t (15.87s)test-pathconflicts-update.t (15.35s)test-show.t (14.38s)test-addremove-similar.t (14.48s)test-contrib.t (1.28s)test-unionrepo.t (14.10s)test-flags.t (13.90s)test-remotefilelog-gc.t (13.74s)test-commit-multiple.t (13.59s)test-commit-unresolved.t#abortcommand (13.50s)test-commit-unresolved.t#abortflag (13.20s)test-import-eol.t (13.12s)test-logtoprocess.t (4.21s)test-mq-missingfiles.t (11.41s)test-sparse-import.t (11.00s)test-rebase-transaction.t#continuecommand (10.63s)test-rebase-transaction.t#continueflag (10.44s)test-identify.t (16.09s)test-default-push.t (10.10s)test-merge-subrepos.t (11.13s)test-narrow-clone-no-ellipsis.t (41.09s)test-filebranch.t (8.98s)test-mq-qdelete.t (22.13s)test-convert-datesort.t (10.60s)test-sidedata.t (7.59s)test-mq-merge.t (16.47s)test-update-atomic.t (6.22s)test-pull-r.t (13.73s)test-clone-update-order.t (9.09s)test-pending.t (10.30s)test-fastannotate-perfhack.t (16.29s)test-origbackup-conflict.t (9.60s)test-merge-local.t (11.80s)test-narrow-pull.t (28.44s)test-remotefilelog-http.t (7.98s)test-bugzilla.t (3.66s)test-exchange-obsmarkers-case-D3.t (16.16s)test-remote-hidden.t (9.49s)test-narrow-shallow.t (29.92s)test-branch-option.t (17.06s)test-merge-halt.t (10.55s)test-worker.t (4.06s)test-mac-packages.t (0.16s)test-empty-group.t (8.01s)test-fix-metadata.t (1.38s)test-parents.t (10.76s)test-http-branchmap.t (6.16s)test-children.t (10.77s)test-diff-change.t (13.41s)test-extdata.t (13.42s)test-bundle2-pushback.t#sshv1 (6.36s)test-bundle2-pushback.t#sshv2 (6.44s)test-rebuildstate.t (11.87s)test-narrow-merge.t#flat (13.70s)test-narrow-merge.t#tree (13.73s)test-mq-pull-from-bundle.t (13.68s)test-exchange-obsmarkers-case-B3.t (14.80s)test-remotefilelog-corrupt-cache.t (7.46s)test-amend-subrepo.t#obsstore-off (15.20s)test-amend-subrepo.t#obsstore-on (14.76s)test-merge-internal-tools-pattern.t (10.28s)test-run-tests.py (0.22s)test-issue672.t (6.03s)test-extensions-afterloaded.t (9.58s)test-tools.t (1.15s)test-fastannotate-corrupt.t (8.82s)test-narrow-commit.t#flat (14.01s)test-narrow-commit.t#tree (13.91s)test-eol-clone.t (6.06s)test-wireproto-serverreactor.py (0.31s)test-excessive-merge.t (9.23s)test-relink.t (6.11s)test-mq-qqueue.t (20.80s)test-narrow-rebase.t#continuecommand (12.71s)test-narrow-rebase.t#continueflag (13.00s)test-push-cgi.t (3.50s)test-record.t (3.38s)test-convert-darcs.t (1.29s)test-remotefilelog-clone-tree.t (8.52s)test-patch.t (7.22s)test-hgweb-non-interactive.t (3.08s)test-sqlitestore.t (5.13s)test-arbitraryfilectx.t (5.46s)test-remotefilelog-clone.t (8.14s)test-remotefilelog-sparse.t (18.20s)test-cache-abuse.t (26.33s)test-rebase-backup.t (9.44s)test-simple-update.t (11.43s)test-pathconflicts-basic.t (11.53s)test-committer.t (8.22s)test-exchange-obsmarkers-case-B7.t (12.97s)test-pull-http.t (6.66s)test-remotefilelog-bundle2-legacy.t (0.92s)test-exchange-obsmarkers-case-B1.t (13.14s)test-remotefilelog-log.t (8.72s)test-mq-qdiff.t (11.08s)test-bookmarks-rebase.t (9.66s)test-serve.t (10.24s)test-exchange-obsmarkers-case-A7.t (11.15s)test-revset-outgoing.t (7.75s)test-import-context.t (2.94s)test-remotefilelog-bundle2.t (9.54s)test-eol-add.t (5.98s)test-bundle-vs-outgoing.t (8.19s)test-rebase-partial.t (7.66s)test-update-names.t (11.08s)test-mailmap.t (7.25s)test-remotefilelog-bundles.t (7.98s)test-merge-remove.t (11.08s)test-convert-tagsbranch-topology.t (2.49s)test-requires.t (6.30s)test-locate.t (16.47s)test-merge-closedheads.t (14.19s)test-rename-after-merge.t (11.72s)test-wireproto-clientreactor.py (0.32s)test-contrib-dumprevlog.t (5.63s)test-remotefilelog-pull-noshallow.t (5.65s)test-debugextensions.t (2.73s)test-narrow-clone-stream.t#flat-fncache (35.45s)test-narrow-clone-stream.t#flat-nofncache (35.31s)test-narrow-clone-stream.t#tree (35.26s)test-rebase-legacy.t#continuecommand (2.56s)test-rebase-legacy.t#continueflag (2.08s)test-issue1306.t (5.30s)test-lfs-bundle.t (9.45s)test-issue1175.t (10.81s)test-cat.t (14.19s)test-nointerrupt.t (5.35s)test-issue660.t (11.90s)test-largefiles-small-disk.t (2.43s)test-convert-clonebranches.t (9.38s)test-oldcgi.t (1.84s)test-impexp-branch.t (8.00s)test-narrow-clone-non-narrow-server.t (13.98s)test-histedit-no-backup.t#abortcommand (4.53s)test-histedit-no-backup.t#abortflag (4.55s)test-issue586.t (10.04s)test-unified-test.t (0.81s)test-rebase-templates.t (6.14s)test-remotefilelog-tags.t (6.62s)test-symlink-placeholder.t (5.81s)test-merge6.t (7.41s)test-narrow-copies.t (9.46s)test-server-view.t (6.84s)test-rebase-issue-noparam-single-rev.t (9.70s)test-dirstate.t (7.28s)test-close-head.t (8.49s)test-url-download.t (6.92s)test-merge-revert2.t (14.43s)test-verify-repo-operations.py (0.14s)test-addremove.t (10.67s)test-mq-qrename.t (18.39s)test-narrow-update.t (9.32s)test-mq-symlinks.t (14.20s)test-ssh-repoerror.t (8.79s)test-wsgirequest.py (0.40s)test-double-merge.t (3.87s)test-narrow-patch.t#flat (4.49s)test-narrow-patch.t#tree (4.64s)test-glog-topological.t (3.88s)test-sparse-verbose-json.t (6.05s)test-merge9.t (8.31s)test-context-metadata.t (4.86s)test-patch-offset.t (1.35s)test-log-exthook.t (2.16s)test-newcgi.t (1.11s)test-issue1802.t (6.09s)test-update-reverse.t (5.67s)test-wireproto-command-branchmap.t (5.34s)test-pushvars.t (4.55s)test-histedit-templates.t (4.10s)test-hgwebdirsym.t (5.68s)test-manifest.py (3.27s)test-revlog-raw.py (0.73s)test-merge-symlinks.t (3.09s)test-branch-tag-confict.t (4.25s)test-narrow-debugcommands.t (5.18s)test-custom-filters.t (3.85s)test-sparse-clone.t (3.24s)test-issue2137.t (1.76s)test-remotefilelog-partial-shallow.t (5.35s)test-eolfilename.t (5.22s)test-merge10.t (6.05s)test-journal-exists.t (4.83s)test-revlog-v2.t (3.65s)test-diffdir.t (8.99s)test-schemes.t (4.95s)test-issue522.t (5.16s)test-histedit-merge-tools.t (3.67s)test-mq-qgoto.t (11.76s)test-revlog.t (2.95s)test-newercgi.t (1.13s)test-url.py (0.25s)test-editor-filename.t (3.10s)test-import-unknown.t (9.52s)test-unbundlehash.t (3.04s)test-narrow-sparse.t#flat (5.32s)test-narrow-sparse.t#tree (5.39s)test-wireproto-command-known.t (3.73s)test-missing-capability.t (5.31s)test-wireproto-command-listkeys.t (4.55s)test-convert-identity.t (5.45s)test-merge-revert.t (14.47s)test-wireproto-command-heads.t (4.17s)test-encode.t (6.16s)test-permissions.t (4.44s)test-casecollision.t (9.84s)test-ancestor.py (1.07s)test-update-dest.t (4.75s)test-known.t (7.07s)test-sparse-fsmonitor.t (0.01s)test-no-symlinks.t (0.10s)test-remotefilelog-datapack.py (1.61s)test-convert-authormap.t (3.19s)test-subrepo-paths.t (3.40s)test-sparse-requirement.t (3.12s)test-confused-revert.t (8.14s)test-debian-packages.t (0.38s)test-remotefilelog-permissions.t (6.18s)test-fuzz-targets.t (0.39s)test-issue1993.t (3.90s)test-issue1502.t (4.80s)test-clone-cgi.t (1.39s)test-sparse-clear.t (4.42s)test-simplemerge.py (0.24s)test-websub.t (2.57s)test-rebase-brute-force.t (3.50s)test-revlog-mmapindex.t (29.23s)test-merge2.t (9.87s)test-diff-antipatience.t#bdiff (1.36s)test-diff-antipatience.t#xdiff (1.75s)test-issue1877.t (6.98s)test-gpg.t (3.12s)test-empty-file.t (5.56s)test-lrucachedict.py (0.23s)test-hgk.t (3.86s)test-changelog-exec.t (4.84s)test-diff-hashes.t (3.84s)test-absorb-edit-lines.t (4.43s)test-remotefilelog-wireproto.t (5.68s)test-mactext.t (2.22s)test-convert-bzr-ghosts.t (0.11s)test-docker-packaging.t (0.25s)test-bookmarks-strip.t (5.38s)test-narrow-acl.t (5.06s)test-remotefilelog-keepset.t (4.26s)test-lock.py (0.24s)test-remotefilelog-histpack.py (3.88s)test-remotefilelog-bad-configs.t (4.21s)test-diff-subdir.t (3.41s)test-convert-bzr-114.t (0.11s)test-trusted.py (0.33s)test-narrow-debugrebuilddirstate.t (3.57s)test-parseindex2.py (0.40s)test-unrelated-pull.t (3.90s)test-diff-reverse.t (4.26s)test-revset-dirstate-parents.t (8.92s)test-wireproto-command-pushkey.t (2.81s)test-update-issue1456.t (5.73s)test-empty.t (2.98s)test-merge5.t (5.15s)test-wireproto-framing.py (0.23s)test-narrow-archive.t (5.10s)test-diff-copy-depth.t (8.30s)test-convert-bzr-treeroot.t (0.14s)test-hgweb-bundle.t (3.05s)test-absorb-unfinished.t (2.67s)test-mq-qimport-fail-cleanup.t (3.08s)test-fix-clang-format.t (2.45s)test-manifest-merging.t (3.56s)test-linerange.py (0.22s)test-issue619.t (3.88s)test-merge8.t (3.94s)test-issue842.t (3.90s)test-remotefilelog-blame.t (5.56s)test-linelog.py (3.64s)test-filecache.py (1.52s)test-revlog-group-emptyiter.t (2.67s)test-propertycache.py (0.84s)test-pathencode.py (0.58s)test-demandimport.py (0.21s)test-archive-symlinks.t (2.48s)test-absorb-strip.t (2.42s)test-pull-permission.t (2.33s)test-issue5979.t (4.73s)test-rust-ancestor.py (0.19s)test-revisions.t (6.32s)test-merge4.t (4.33s)test-absorb-filefixupstate.py (0.43s)test-wireproto-command-lookup.t (2.34s)test-phabricator.t (0.71s)test-context.py (0.50s)test-issue612.t (4.06s)test-debugindexdot.t (4.31s)test-batching.py (0.34s)test-eol-tag.t (2.61s)test-bdiff.py (0.23s)test-hgweb-auth.py (0.12s)test-nested-repo.t (4.97s)test-minirst.py (0.27s)test-execute-bit.t (4.41s)test-username-newline.t (1.73s)test-fastannotate-revmap.py (0.41s)test-issue4074.t (2.51s)test-remotefilelog-share.t (3.26s)test-revlog-packentry.t (2.15s)test-dirstate-nonnormalset.t (3.46s)test-ui-config.py (0.45s)test-diff-issue2761.t (3.56s)test-atomictempfile.py (0.23s)test-strict.t (3.34s)test-util.py (0.23s)test-diff-newlines.t (1.73s)test-rust-discovery.py (0.19s)test-empty-dir.t (2.62s)test-storage.py (1.75s)test-absorb-phase.t (3.03s)test-annotate.py (0.26s)test-extra-filelog-entry.t (2.66s)test-debugrename.t (3.36s)test-issue1438.t (3.40s)test-issue1102.t (2.83s)test-fastannotate-diffopts.t (1.81s)test-revert-unknown.t (3.00s)test-bad-pull.t (1.78s)test-revert-flags.t (2.65s)test-simplekeyvaluefile.py (0.25s)test-issue1089.t (2.74s)test-doctest.py (1.11s)test-backwards-remove.t (2.33s)test-wireproto.py (0.33s)test-contrib-emacs.t (0.41s)test-cappedreader.py (0.23s)test-xdg.t (0.53s)test-dirstate-backup.t (0.87s)test-mq-qsave.t (1.83s)test-encoding-func.py (0.20s)test-extensions-wrapfunction.py (0.32s)test-walkrepo.py (0.42s)test-revlog-ancestry.py (0.56s)test-ui-verbosity.py (0.34s)test-filelog.py (0.42s)test-sshserver.py (0.32s)test-hg-parseurl.py (0.38s)test-symlink-os-yes-fs-no.py (1.45s)test-minifileset.py (0.29s)test-config-env.py (0.29s)test-lfs-pointer.py (0.41s)test-duplicateoptions.py (0.51s)test-hgwebdir-paths.py (0.38s)test-ui-color.py (0.30s)test-status-inprocess.py (0.37s)test-dispatch.py (0.34s)test-mdiff.py (0.20s)