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

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

Issue 2397573002: Don't track SCM changes in rebaseline commands. (Closed)
Patch Set: Rebased Created 4 years, 2 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
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 self._run_git(['rebase', '--abort']) 110 self._run_git(['rebase', '--abort'])
111 111
112 def status_command(self): 112 def status_command(self):
113 # git status returns non-zero when there are changes, so we use git diff name --name-status HEAD instead. 113 # git status returns non-zero when there are changes, so we use git diff name --name-status HEAD instead.
114 # No file contents printed, thus utf-8 autodecoding in self.run is fine. 114 # No file contents printed, thus utf-8 autodecoding in self.run is fine.
115 return [self.executable_name, "diff", "--name-status", "--no-renames", " HEAD"] 115 return [self.executable_name, "diff", "--name-status", "--no-renames", " HEAD"]
116 116
117 def _status_regexp(self, expected_types): 117 def _status_regexp(self, expected_types):
118 return '^(?P<status>[%s])\t(?P<filename>.+)$' % expected_types 118 return '^(?P<status>[%s])\t(?P<filename>.+)$' % expected_types
119 119
120 def add_all(self):
wkorman 2016/10/06 21:10:22 What if we allow passing a pathspec, which --all s
qyearsley 2016/10/06 23:05:57 Good idea, will add this :-)
121 return self._run_git(['add', '--all'])
122
120 def add_list(self, paths, return_exit_code=False, recurse=True): 123 def add_list(self, paths, return_exit_code=False, recurse=True):
121 return self._run_git(["add"] + paths, return_exit_code=return_exit_code) 124 return self._run_git(["add"] + paths, return_exit_code=return_exit_code)
122 125
123 def delete_list(self, paths): 126 def delete_list(self, paths):
124 return self._run_git(["rm", "-f"] + paths) 127 return self._run_git(["rm", "-f"] + paths)
125 128
126 def move(self, origin, destination): 129 def move(self, origin, destination):
127 return self._run_git(["mv", "-f", origin, destination]) 130 return self._run_git(["mv", "-f", origin, destination])
128 131
129 def exists(self, path): 132 def exists(self, path):
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if self.current_branch() != self._branch_tracking_remote_master(): 324 if self.current_branch() != self._branch_tracking_remote_master():
322 return False 325 return False
323 if len(self._local_commits(self._branch_tracking_remote_master())) > 0: 326 if len(self._local_commits(self._branch_tracking_remote_master())) > 0:
324 return False 327 return False
325 return True 328 return True
326 329
327 def ensure_cleanly_tracking_remote_master(self): 330 def ensure_cleanly_tracking_remote_master(self):
328 self._discard_working_directory_changes() 331 self._discard_working_directory_changes()
329 self._run_git(['checkout', '-q', self._branch_tracking_remote_master()]) 332 self._run_git(['checkout', '-q', self._branch_tracking_remote_master()])
330 self._discard_local_commits() 333 self._discard_local_commits()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698