# HG changeset patch # User Gregory Szorc # Date 2019-02-04 17:00:52 # Node ID 7a90ff8cd14c51c5a0c8cda41e0814e14a25304b # Parent 47c92f8ed128d773a8dd9a7aa4e0c710de523969 crecord: use raw string for regular expression \s emits a SyntaxWarning in Python 3.8. Use a raw string to avoid escaping the \. Differential Revision: https://phab.mercurial-scm.org/D5819 diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -1799,6 +1799,7 @@ are you sure you want to review/edit and 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