| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 def NewContents(self): | 113 def NewContents(self): |
| 114 return self._new_contents | 114 return self._new_contents |
| 115 | 115 |
| 116 def LocalPath(self): | 116 def LocalPath(self): |
| 117 return self._local_path | 117 return self._local_path |
| 118 | 118 |
| 119 def AbsoluteLocalPath(self): | 119 def AbsoluteLocalPath(self): |
| 120 return self._local_path | 120 return self._local_path |
| 121 | 121 |
| 122 def GenerateScmDiff(self): | 122 def GenerateScmDiff(self): |
| 123 return self._scm_diff; | 123 return self._scm_diff |
| 124 | 124 |
| 125 def rfind(self, p): | 125 def rfind(self, p): |
| 126 """os.path.basename is called on MockFile so we need an rfind method.""" | 126 """os.path.basename is called on MockFile so we need an rfind method.""" |
| 127 return self._local_path.rfind(p) | 127 return self._local_path.rfind(p) |
| 128 | 128 |
| 129 def __getitem__(self, i): | 129 def __getitem__(self, i): |
| 130 """os.path.basename is called on MockFile so we need a get method.""" | 130 """os.path.basename is called on MockFile so we need a get method.""" |
| 131 return self._local_path[i] | 131 return self._local_path[i] |
| 132 | 132 |
| 133 def __len__(self): | 133 def __len__(self): |
| (...skipping 15 matching lines...) Expand all Loading... |
| 149 | 149 |
| 150 def __init__(self, changed_files): | 150 def __init__(self, changed_files): |
| 151 self._changed_files = changed_files | 151 self._changed_files = changed_files |
| 152 | 152 |
| 153 def LocalPaths(self): | 153 def LocalPaths(self): |
| 154 return self._changed_files | 154 return self._changed_files |
| 155 | 155 |
| 156 def AffectedFiles(self, include_dirs=False, include_deletes=True, | 156 def AffectedFiles(self, include_dirs=False, include_deletes=True, |
| 157 file_filter=None): | 157 file_filter=None): |
| 158 return self._changed_files | 158 return self._changed_files |
| OLD | NEW |