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

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

Issue 1809723002: Remove optional --commit-author argument from auto-rebaseline script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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.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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 def _remote_merge_base(self): 258 def _remote_merge_base(self):
259 return self._run_git(['merge-base', self._remote_branch_ref(), 'HEAD']). strip() 259 return self._run_git(['merge-base', self._remote_branch_ref(), 'HEAD']). strip()
260 260
261 def _remote_branch_ref(self): 261 def _remote_branch_ref(self):
262 # Use references so that we can avoid collisions, e.g. we don't want to operate on refs/heads/trunk if it exists. 262 # Use references so that we can avoid collisions, e.g. we don't want to operate on refs/heads/trunk if it exists.
263 remote_master_ref = 'refs/remotes/origin/master' 263 remote_master_ref = 'refs/remotes/origin/master'
264 if not self._branch_ref_exists(remote_master_ref): 264 if not self._branch_ref_exists(remote_master_ref):
265 raise ScriptError(message="Can't find a branch to diff against. %s d oes not exist" % remote_master_ref) 265 raise ScriptError(message="Can't find a branch to diff against. %s d oes not exist" % remote_master_ref)
266 return remote_master_ref 266 return remote_master_ref
267 267
268 def commit_locally_with_message(self, message, commit_all_working_directory_ changes=True, author=None): 268 def commit_locally_with_message(self, message, commit_all_working_directory_ changes=True):
269 command = ['commit', '-F', '-'] 269 command = ['commit', '-F', '-']
270 if commit_all_working_directory_changes: 270 if commit_all_working_directory_changes:
271 command.insert(1, '--all') 271 command.insert(1, '--all')
272 if author:
273 command.insert(1, "--author='%s'" % (author))
274 self._run_git(command, input=message) 272 self._run_git(command, input=message)
275 273
276 # These methods are git specific and are meant to provide support for the Gi t oriented workflow 274 # These methods are git specific and are meant to provide support for the Gi t oriented workflow
277 # that Blink is moving towards, hence there are no equivalent methods in the SVN class. 275 # that Blink is moving towards, hence there are no equivalent methods in the SVN class.
278 276
279 def pull(self): 277 def pull(self):
280 self._run_git(['pull']) 278 self._run_git(['pull'])
281 279
282 def latest_git_commit(self): 280 def latest_git_commit(self):
283 return self._run_git(['log', '-1', '--format=%H']).strip() 281 return self._run_git(['log', '-1', '--format=%H']).strip()
(...skipping 25 matching lines...) Expand all
309 if self.current_branch() != self._branch_tracking_remote_master(): 307 if self.current_branch() != self._branch_tracking_remote_master():
310 return False 308 return False
311 if len(self._local_commits(self._branch_tracking_remote_master())) > 0: 309 if len(self._local_commits(self._branch_tracking_remote_master())) > 0:
312 return False 310 return False
313 return True 311 return True
314 312
315 def ensure_cleanly_tracking_remote_master(self): 313 def ensure_cleanly_tracking_remote_master(self):
316 self._discard_working_directory_changes() 314 self._discard_working_directory_changes()
317 self._run_git(['checkout', '-q', self._branch_tracking_remote_master()]) 315 self._run_git(['checkout', '-q', self._branch_tracking_remote_master()])
318 self._discard_local_commits() 316 self._discard_local_commits()
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698