Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py

Issue 2305143003: webkitpy: Make all regex strings use raw string literals. (Closed)
Patch Set: Make all regex strings raw strings. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
index 08fafb2da28738acf0b2ea6f15aafee1a18e5f23..90fd961b660803ce5bf092fd537f4ba2bc19069f 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
@@ -34,12 +34,12 @@ import re
_log = logging.getLogger(__name__)
conversion_patterns = (
- (re.compile("^diff --git \w/(.+) \w/(?P<FilePath>.+)"), lambda matched: "Index: " + matched.group('FilePath') + "\n"),
- (re.compile("^new file.*"), lambda matched: "\n"),
- (re.compile("^index (([0-9a-f]{7}\.\.[0-9a-f]{7})|([0-9a-f]{40}\.\.[0-9a-f]{40})) [0-9]{6}"),
+ (re.compile(r"^diff --git \w/(.+) \w/(?P<FilePath>.+)"), lambda matched: "Index: " + matched.group('FilePath') + "\n"),
+ (re.compile(r"^new file.*"), lambda matched: "\n"),
+ (re.compile(r"^index (([0-9a-f]{7}\.\.[0-9a-f]{7})|([0-9a-f]{40}\.\.[0-9a-f]{40})) [0-9]{6}"),
lambda matched: ("=" * 67) + "\n"),
- (re.compile("^--- \w/(?P<FilePath>.+)"), lambda matched: "--- " + matched.group('FilePath') + "\n"),
- (re.compile("^\+\+\+ \w/(?P<FilePath>.+)"), lambda matched: "+++ " + matched.group('FilePath') + "\n"),
+ (re.compile(r"^--- \w/(?P<FilePath>.+)"), lambda matched: "--- " + matched.group('FilePath') + "\n"),
+ (re.compile(r"^\+\+\+ \w/(?P<FilePath>.+)"), lambda matched: "+++ " + matched.group('FilePath') + "\n"),
)
index_pattern = re.compile(r"^Index: (?P<FilePath>.+)")
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698