Patchwork D5819: crecord: use raw string for regular expression

login
register
mail settings
Submitter phabricator
Date Feb. 4, 2019, 11:35 p.m.
Message ID <0b3d0e40cd768fbea854c70fc0bac6e7@localhost.localdomain>
Download mbox | patch
Permalink /patch/38398/
State Not Applicable
Headers show

Comments

phabricator - Feb. 4, 2019, 11:35 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7a90ff8cd14c: crecord: use raw string for regular expression (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5819?vs=13746&id=13779

REVISION DETAIL
  https://phab.mercurial-scm.org/D5819

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -1799,6 +1799,7 @@ 
                 break
 
         if self.commenttext != "":
-            whitespaceremoved = re.sub("(?m)^\s.*(\n|$)", "", self.commenttext)
+            whitespaceremoved = re.sub(br"(?m)^\s.*(\n|$)", b"",
+                                       self.commenttext)
             if whitespaceremoved != "":
                 self.opts['message'] = self.commenttext