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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py

Issue 2397573002: Don't track SCM changes in rebaseline commands. (Closed)
Patch Set: Update message and docstring for has_working_directory_changes 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
index 76392e28977c282e3377fb97d2db441b18dfbd0a..2bc3946ba9faccb29a47a6b065937de4bc9ab748 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
@@ -31,6 +31,10 @@ from webkitpy.common.system.executive_mock import MockExecutive
class MockSCM(object):
+
+ # Arguments are generally unused in methods that return canned values below.
+ # pylint: disable=unused-argument
+
executable_name = "MockSCM"
def __init__(self, filesystem=None, executive=None):
@@ -40,6 +44,12 @@ class MockSCM(object):
self._executive = executive or MockExecutive()
self._local_commits = []
+ def add_all(self, pathspec=None):
+ if not pathspec:
+ pathspec = self.checkout_root
+ for path in self._filesystem.glob(pathspec):
+ self.add_list(self._filesystem.files_under(path))
+
def add(self, destination_path, return_exit_code=False):
self.add_list([destination_path], return_exit_code)
@@ -48,7 +58,7 @@ class MockSCM(object):
if return_exit_code:
return 0
- def has_working_directory_changes(self):
+ def has_working_directory_changes(self, pathspec=None):
return False
def ensure_cleanly_tracking_remote_master(self):

Powered by Google App Engine
This is Rietveld 408576698