py3: use .+ instead of .* in regexp pattern
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 11 Oct 2018 22:53:44 +0200
changeset 40160 6037c49b8964
parent 40159 5774fc623a18
child 40161 3eea8e83c261
py3: use .+ instead of .* in regexp pattern Python 3.7 changed the behavior of re.sub(). See https://bugs.python.org/issue33585. The new code should work on old and new Pythons. Differential Revision: https://phab.mercurial-scm.org/D4971
tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t	Thu Oct 11 22:26:12 2018 +0200
+++ b/tests/test-hgweb-commands.t	Thu Oct 11 22:53:44 2018 +0200
@@ -36,7 +36,7 @@
   > stable.width = 3
   > stable.color = FF0000
   > [websub]
-  > append = s|(.*)|\1(websub)|
+  > append = s|(.+)|\1(websub)|
   > EOF
 
   $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log