patch: properly escape \ in string literals
Python 3.8 will emit a SyntaxWarning for str/bytes with invalid
escapes. This commit addresses 4 occurrences where we had a bare
\ in a str/bytes.
Differential Revision: https://phab.mercurial-scm.org/D5818
To run the tests, do:
cd tests/
python run-tests.py
See https://mercurial-scm.org/wiki/WritingTests for
more information on writing tests.