Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py

Issue 1918993003: Git patches created by webkitpy now always have filename prefixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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()
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698