| OLD | NEW |
| 1 # Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. | 1 # Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 2 # Copyright (c) 2009 Apple Inc. All rights reserved. | 2 # Copyright (c) 2009 Apple Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 # Put code changes at the top of the patch and layout tests | 226 # Put code changes at the top of the patch and layout tests |
| 227 # at the bottom, this makes for easier reviewing. | 227 # at the bottom, this makes for easier reviewing. |
| 228 config_path = self._filesystem.dirname(self._filesystem.path_to_module('
webkitpy.common.config')) | 228 config_path = self._filesystem.dirname(self._filesystem.path_to_module('
webkitpy.common.config')) |
| 229 order_file = self._filesystem.join(config_path, 'orderfile') | 229 order_file = self._filesystem.join(config_path, 'orderfile') |
| 230 order = "" | 230 order = "" |
| 231 if self._filesystem.exists(order_file): | 231 if self._filesystem.exists(order_file): |
| 232 order = "-O%s" % order_file | 232 order = "-O%s" % order_file |
| 233 | 233 |
| 234 command = [self.executable_name, 'diff', '--binary', '--no-color', "--no
-ext-diff", | 234 command = [self.executable_name, 'diff', '--binary', '--no-color', "--no
-ext-diff", |
| 235 "--full-index", "--no-renames", order, self._merge_base(git_c
ommit), "--"] | 235 "--full-index", "--no-renames", "--src-prefix=a/", "--dst-pre
fix=b/", |
| 236 order, self._merge_base(git_commit), "--"] |
| 236 if changed_files: | 237 if changed_files: |
| 237 command += changed_files | 238 command += changed_files |
| 238 return self._run(command, decode_output=False, cwd=self.checkout_root) | 239 return self._run(command, decode_output=False, cwd=self.checkout_root) |
| 239 | 240 |
| 240 @memoized | 241 @memoized |
| 241 def commit_position_from_git_commit(self, git_commit): | 242 def commit_position_from_git_commit(self, git_commit): |
| 242 git_log = self.git_commit_detail(git_commit) | 243 git_log = self.git_commit_detail(git_commit) |
| 243 return self._commit_position_from_git_log(git_log) | 244 return self._commit_position_from_git_log(git_log) |
| 244 | 245 |
| 245 def checkout_branch(self, name): | 246 def checkout_branch(self, name): |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 if self.current_branch() != self._branch_tracking_remote_master(): | 310 if self.current_branch() != self._branch_tracking_remote_master(): |
| 310 return False | 311 return False |
| 311 if len(self._local_commits(self._branch_tracking_remote_master())) > 0: | 312 if len(self._local_commits(self._branch_tracking_remote_master())) > 0: |
| 312 return False | 313 return False |
| 313 return True | 314 return True |
| 314 | 315 |
| 315 def ensure_cleanly_tracking_remote_master(self): | 316 def ensure_cleanly_tracking_remote_master(self): |
| 316 self._discard_working_directory_changes() | 317 self._discard_working_directory_changes() |
| 317 self._run_git(['checkout', '-q', self._branch_tracking_remote_master()]) | 318 self._run_git(['checkout', '-q', self._branch_tracking_remote_master()]) |
| 318 self._discard_local_commits() | 319 self._discard_local_commits() |
| OLD | NEW |