D6863: py3: byte-prefix sanitisation regexes in phabricator.py
Kwan (Ian Moody)
phabricator at mercurial-scm.org
Tue Sep 17 20:11:01 UTC 2019
Kwan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
So it doesn't die with "TypeError: cannot use a string pattern on a bytes-like
object".
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6863
AFFECTED FILES
hgext/phabricator.py
CHANGE DETAILS
diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -136,8 +136,8 @@
def sanitiserequest(request):
request.body = re.sub(
- r'cli-[a-z0-9]+',
- r'cli-hahayouwish',
+ br'cli-[a-z0-9]+',
+ br'cli-hahayouwish',
request.body
)
return request
To: Kwan, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list