OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Samples patches to test patch.py.""" | 6 """Samples patches to test patch.py.""" |
7 | 7 |
8 | 8 |
9 class RAW(object): | 9 class RAW(object): |
10 PATCH = ( | 10 PATCH = ( |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 '+++ b/chrome/file.cc\n' | 145 '+++ b/chrome/file.cc\n' |
146 '@@ -3,6 +3,7 @@ bb\n' | 146 '@@ -3,6 +3,7 @@ bb\n' |
147 ' ccc\n' | 147 ' ccc\n' |
148 ' dd\n' | 148 ' dd\n' |
149 ' e\n' | 149 ' e\n' |
150 '+FOO!\n' | 150 '+FOO!\n' |
151 ' ff\n' | 151 ' ff\n' |
152 ' ggg\n' | 152 ' ggg\n' |
153 ' hh\n') | 153 ' hh\n') |
154 | 154 |
| 155 # http://codereview.chromium.org/download/issue10868039_12001_10003.diff |
| 156 PATCH_SHORT_HUNK_HEADER = ( |
| 157 'Index: chrome/browser/api/OWNERS\n' |
| 158 'diff --git a/chrome/browser/api/OWNERS b/chrome/browser/api/OWNERS\n' |
| 159 '--- a/chrome/browser/api/OWNERS\n' |
| 160 '+++ b/chrome/browser/api/OWNERS\n' |
| 161 '@@ -1 +1,2 @@\n' |
| 162 '+erikwright@chromium.org\n' |
| 163 ' joi@chromium.org\n') |
| 164 |
155 # http://codereview.chromium.org/download/issue6368055_22_29.diff | 165 # http://codereview.chromium.org/download/issue6368055_22_29.diff |
156 DELETE = ( | 166 DELETE = ( |
157 'Index: tools/clang_check/README.chromium\n' | 167 'Index: tools/clang_check/README.chromium\n' |
158 'diff --git a/tools/clang_check/README.chromium ' | 168 'diff --git a/tools/clang_check/README.chromium ' |
159 'b/tools/clang_check/README.chromium\n' | 169 'b/tools/clang_check/README.chromium\n' |
160 'deleted file mode 100644\n' | 170 'deleted file mode 100644\n' |
161 'index fcaa7e0e94bb604a026c4f478fecb1c5796f5413..' | 171 'index fcaa7e0e94bb604a026c4f478fecb1c5796f5413..' |
162 '0000000000000000000000000000000000000000\n' | 172 '0000000000000000000000000000000000000000\n' |
163 '--- a/tools/clang_check/README.chromium\n' | 173 '--- a/tools/clang_check/README.chromium\n' |
164 '+++ /dev/null\n' | 174 '+++ /dev/null\n' |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 ' \n' | 332 ' \n' |
323 ' def GenerateScmDiff(self):\n' | 333 ' def GenerateScmDiff(self):\n' |
324 '- return scm.GIT.GenerateDiff(self._local_root, files=[self.Lo...\n' | 334 '- return scm.GIT.GenerateDiff(self._local_root, files=[self.Lo...\n' |
325 '+ if self._diff is None:\n' | 335 '+ if self._diff is None:\n' |
326 '+ self._diff = scm.GIT.GenerateDiff(\n' | 336 '+ self._diff = scm.GIT.GenerateDiff(\n' |
327 '+ self._local_root, files=[self.LocalPath(),])\n' | 337 '+ self._local_root, files=[self.LocalPath(),])\n' |
328 '+ return self._diff\n' | 338 '+ return self._diff\n' |
329 ' \n' | 339 ' \n' |
330 ' \n' | 340 ' \n' |
331 ' class Change(object):\n') | 341 ' class Change(object):\n') |
OLD | NEW |