D6863: py3: byte-prefix sanitisation regexes in phabricator.py

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

D6863: py3: byte-prefix sanitisation regexes in phabricator.py

martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D6863: py3: byte-prefix sanitisation regexes in phabricator.py

martinvonz (Martin von Zweigbergk)
Closed by commit rHG04c6de38734d: py3: byte-prefix sanitisation regexes in phabricator.py (authored by Kwan).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6863?vs=16574&id=16584

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6863/new/

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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel