|
20 | 20 | # general diff regex
|
21 | 21 | diffcmd_header = re.compile('^diff.* (.+) (.+)$')
|
22 | 22 | unified_header_index = re.compile('^Index: (.+)$')
|
23 |
| -unified_header_old_line = re.compile('^--- ' + file_timestamp_str + '$') |
24 |
| -unified_header_new_line = re.compile('^\+\+\+ ' + file_timestamp_str + '$') |
25 |
| -unified_hunk_start = re.compile('^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@(.*)$') |
| 23 | +unified_header_old_line = re.compile(r'^--- ' + file_timestamp_str + '$') |
| 24 | +unified_header_new_line = re.compile(r'^\+\+\+ ' + file_timestamp_str + '$') |
| 25 | +unified_hunk_start = re.compile(r'^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@(.*)$') |
26 | 26 | unified_change = re.compile('^([-+ ])(.*)$')
|
27 | 27 |
|
28 |
| -context_header_old_line = re.compile('^\*\*\* ' + file_timestamp_str + '$') |
| 28 | +context_header_old_line = re.compile(r'^\*\*\* ' + file_timestamp_str + '$') |
29 | 29 | context_header_new_line = re.compile('^--- ' + file_timestamp_str + '$')
|
30 |
| -context_hunk_start = re.compile('^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*$') |
31 |
| -context_hunk_old = re.compile('^\*\*\* (\d+),?(\d*) \*\*\*\*$') |
32 |
| -context_hunk_new = re.compile('^--- (\d+),?(\d*) ----$') |
| 30 | +context_hunk_start = re.compile(r'^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*$') |
| 31 | +context_hunk_old = re.compile(r'^\*\*\* (\d+),?(\d*) \*\*\*\*$') |
| 32 | +context_hunk_new = re.compile(r'^--- (\d+),?(\d*) ----$') |
33 | 33 | context_change = re.compile('^([-+ !]) (.*)$')
|
34 | 34 |
|
35 |
| -ed_hunk_start = re.compile('^(\d+),?(\d*)([acd])$') |
| 35 | +ed_hunk_start = re.compile(r'^(\d+),?(\d*)([acd])$') |
36 | 36 | ed_hunk_end = re.compile('^.$')
|
37 | 37 | # much like forward ed, but no 'c' type
|
38 |
| -rcs_ed_hunk_start = re.compile('^([ad])(\d+) ?(\d*)$') |
| 38 | +rcs_ed_hunk_start = re.compile(r'^([ad])(\d+) ?(\d*)$') |
39 | 39 |
|
40 |
| -default_hunk_start = re.compile('^(\d+),?(\d*)([acd])(\d+),?(\d*)$') |
| 40 | +default_hunk_start = re.compile(r'^(\d+),?(\d*)([acd])(\d+),?(\d*)$') |
41 | 41 | default_hunk_mid = re.compile('^---$')
|
42 | 42 | default_change = re.compile('^([><]) (.*)$')
|
43 | 43 |
|
44 | 44 | # Headers
|
45 | 45 |
|
46 | 46 | # git has a special index header and no end part
|
47 | 47 | git_diffcmd_header = re.compile('^diff --git a/(.+) b/(.+)$')
|
48 |
| -git_header_index = re.compile('^index ([a-f0-9]+)..([a-f0-9]+) ?(\d*)$') |
| 48 | +git_header_index = re.compile(r'^index ([a-f0-9]+)..([a-f0-9]+) ?(\d*)$') |
49 | 49 | git_header_old_line = re.compile('^--- (.+)$')
|
50 |
| -git_header_new_line = re.compile('^\+\+\+ (.+)$') |
51 |
| -git_header_file_mode = re.compile('^(new|deleted) file mode \d{6}$') |
| 50 | +git_header_new_line = re.compile(r'^\+\+\+ (.+)$') |
| 51 | +git_header_file_mode = re.compile(r'^(new|deleted) file mode \d{6}$') |
52 | 52 | git_header_binary_file = re.compile('^Binary files (.+) and (.+) differ')
|
53 | 53 |
|
54 | 54 | bzr_header_index = re.compile("=== (.+)")
|
|
57 | 57 |
|
58 | 58 | svn_header_index = unified_header_index
|
59 | 59 | svn_header_timestamp_version = re.compile(
|
60 |
| - '\((?:working copy|revision (\d+))\)' |
| 60 | + r'\((?:working copy|revision (\d+))\)' |
61 | 61 | )
|
62 |
| -svn_header_timestamp = re.compile('.*(\(.*\))$') |
| 62 | +svn_header_timestamp = re.compile(r'.*(\(.*\))$') |
63 | 63 |
|
64 | 64 | cvs_header_index = unified_header_index
|
65 |
| -cvs_header_rcs = re.compile('^RCS file: (.+)(?:,\w{1}$|$)') |
66 |
| -cvs_header_timestamp = re.compile('(.+)\t([\d.]+)') |
67 |
| -cvs_header_timestamp_colon = re.compile(':([\d.]+)\t(.+)') |
| 65 | +cvs_header_rcs = re.compile(r'^RCS file: (.+)(?:,\w{1}$|$)') |
| 66 | +cvs_header_timestamp = re.compile(r'(.+)\t([\d.]+)') |
| 67 | +cvs_header_timestamp_colon = re.compile(r':([\d.]+)\t(.+)') |
68 | 68 | old_cvs_diffcmd_header = re.compile('^diff.* (.+):(.*) (.+):(.*)$')
|
69 | 69 |
|
70 | 70 |
|
|
0 commit comments