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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n' | 285 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n' |
286 'old mode 100644\n' | 286 'old mode 100644\n' |
287 'new mode 100755\n') | 287 'new mode 100755\n') |
288 | 288 |
289 MODE_EXE_JUNK = ( | 289 MODE_EXE_JUNK = ( |
290 'Index: Junk\n' | 290 'Index: Junk\n' |
291 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n' | 291 'diff --git a/git_cl/git-cl b/git_cl/git-cl\n' |
292 'old mode 100644\n' | 292 'old mode 100644\n' |
293 'new mode 100755\n') | 293 'new mode 100755\n') |
294 | 294 |
| 295 NEW_NOT_EXECUTABLE = ( |
| 296 'diff --git a/build/android/ant/create.js b/build/android/ant/create.js\n' |
| 297 'new file mode 100644\n' |
| 298 'index 0000000000000000000..542a89e978feada38dd\n' |
| 299 '--- /dev/null\n' |
| 300 '+++ b/build/android/ant/create.js\n' |
| 301 '@@ -0,0 +1,1 @@\n' |
| 302 '+// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n' |
| 303 ) |
| 304 |
295 FOUR_HUNKS = ( | 305 FOUR_HUNKS = ( |
296 'Index: presubmit_support.py\n' | 306 'Index: presubmit_support.py\n' |
297 'diff --git a/presubmit_support.py b/presubmit_support.py\n' | 307 'diff --git a/presubmit_support.py b/presubmit_support.py\n' |
298 'index 52416d3f..d56512f2 100755\n' | 308 'index 52416d3f..d56512f2 100755\n' |
299 '--- a/presubmit_support.py\n' | 309 '--- a/presubmit_support.py\n' |
300 '+++ b/presubmit_support.py\n' | 310 '+++ b/presubmit_support.py\n' |
301 '@@ -558,6 +558,7 @@ class SvnAffectedFile(AffectedFile):\n' | 311 '@@ -558,6 +558,7 @@ class SvnAffectedFile(AffectedFile):\n' |
302 ' AffectedFile.__init__(self, *args, **kwargs)\n' | 312 ' AffectedFile.__init__(self, *args, **kwargs)\n' |
303 ' self._server_path = None\n' | 313 ' self._server_path = None\n' |
304 ' self._is_text_file = None\n' | 314 ' self._is_text_file = None\n' |
(...skipping 27 matching lines...) Expand all Loading... |
332 ' \n' | 342 ' \n' |
333 ' def GenerateScmDiff(self):\n' | 343 ' def GenerateScmDiff(self):\n' |
334 '- return scm.GIT.GenerateDiff(self._local_root, files=[self.Lo...\n' | 344 '- return scm.GIT.GenerateDiff(self._local_root, files=[self.Lo...\n' |
335 '+ if self._diff is None:\n' | 345 '+ if self._diff is None:\n' |
336 '+ self._diff = scm.GIT.GenerateDiff(\n' | 346 '+ self._diff = scm.GIT.GenerateDiff(\n' |
337 '+ self._local_root, files=[self.LocalPath(),])\n' | 347 '+ self._local_root, files=[self.LocalPath(),])\n' |
338 '+ return self._diff\n' | 348 '+ return self._diff\n' |
339 ' \n' | 349 ' \n' |
340 ' \n' | 350 ' \n' |
341 ' class Change(object):\n') | 351 ' class Change(object):\n') |
OLD | NEW |