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

Side by Side 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: 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) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 22 matching lines...) Expand all
33 class MockSCM(object): 33 class MockSCM(object):
34 executable_name = "MockSCM" 34 executable_name = "MockSCM"
35 35
36 def __init__(self, filesystem=None, executive=None): 36 def __init__(self, filesystem=None, executive=None):
37 self.checkout_root = "/mock-checkout" 37 self.checkout_root = "/mock-checkout"
38 self.added_paths = set() 38 self.added_paths = set()
39 self._filesystem = filesystem or MockFileSystem() 39 self._filesystem = filesystem or MockFileSystem()
40 self._executive = executive or MockExecutive() 40 self._executive = executive or MockExecutive()
41 self._local_commits = [] 41 self._local_commits = []
42 42
43 def add_all(self):
44 pass
qyearsley 2016/10/06 23:05:57 Note, I think it might be nice to actually make th
45
43 def add(self, destination_path, return_exit_code=False): 46 def add(self, destination_path, return_exit_code=False):
44 self.add_list([destination_path], return_exit_code) 47 self.add_list([destination_path], return_exit_code)
45 48
46 def add_list(self, destination_paths, return_exit_code=False): 49 def add_list(self, destination_paths, return_exit_code=False):
47 self.added_paths.update(set(destination_paths)) 50 self.added_paths.update(set(destination_paths))
48 if return_exit_code: 51 if return_exit_code:
49 return 0 52 return 0
50 53
51 def has_working_directory_changes(self): 54 def has_working_directory_changes(self):
52 return False 55 return False
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 for path in paths: 116 for path in paths:
114 if self._filesystem.exists(path): 117 if self._filesystem.exists(path):
115 self._filesystem.remove(path) 118 self._filesystem.remove(path)
116 119
117 def move(self, origin, destination): 120 def move(self, origin, destination):
118 if self._filesystem: 121 if self._filesystem:
119 self._filesystem.move(self.absolute_path(origin), self.absolute_path (destination)) 122 self._filesystem.move(self.absolute_path(origin), self.absolute_path (destination))
120 123
121 def changed_files(self): 124 def changed_files(self):
122 return [] 125 return []
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698