D5819: crecord: use raw string for regular expression

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Feb 4 18:35:55 EST 2019


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

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



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


More information about the Mercurial-devel mailing list