OLD | NEW |
1 # Copyright (c) 2009, Google Inc. All rights reserved. | 1 # Copyright (c) 2009, 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 def _subclass_must_implement(): | 79 def _subclass_must_implement(): |
80 raise NotImplementedError("subclasses must implement") | 80 raise NotImplementedError("subclasses must implement") |
81 | 81 |
82 @classmethod | 82 @classmethod |
83 def in_working_directory(cls, path, executive=None): | 83 def in_working_directory(cls, path, executive=None): |
84 SCM._subclass_must_implement() | 84 SCM._subclass_must_implement() |
85 | 85 |
86 def find_checkout_root(self, path): | 86 def find_checkout_root(self, path): |
87 SCM._subclass_must_implement() | 87 SCM._subclass_must_implement() |
88 | 88 |
89 def add(self, path, return_exit_code=False): | 89 def add(self, path, return_exit_code=False, recurse=True): |
90 self.add_list([path], return_exit_code) | 90 self.add_list([path], return_exit_code, recurse) |
91 | 91 |
92 def add_list(self, paths, return_exit_code=False): | 92 def add_list(self, paths, return_exit_code=False, recurse=True): |
93 self._subclass_must_implement() | 93 self._subclass_must_implement() |
94 | 94 |
95 def delete(self, path): | 95 def delete(self, path): |
96 self.delete_list([path]) | 96 self.delete_list([path]) |
97 | 97 |
98 def delete_list(self, paths): | 98 def delete_list(self, paths): |
99 self._subclass_must_implement() | 99 self._subclass_must_implement() |
100 | 100 |
101 def move(self, origin, destination): | 101 def move(self, origin, destination): |
102 self._subclass_must_implement() | 102 self._subclass_must_implement() |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 #-------------------------------------------------------------------------- | 135 #-------------------------------------------------------------------------- |
136 # Subclasses must indicate if they support local commits, | 136 # Subclasses must indicate if they support local commits, |
137 # but the SCM baseclass will only call local_commits methods when this is tr
ue. | 137 # but the SCM baseclass will only call local_commits methods when this is tr
ue. |
138 @staticmethod | 138 @staticmethod |
139 def supports_local_commits(): | 139 def supports_local_commits(): |
140 SCM._subclass_must_implement() | 140 SCM._subclass_must_implement() |
141 | 141 |
142 def commit_locally_with_message(self, message, commit_all_working_directory_
changes=True): | 142 def commit_locally_with_message(self, message, commit_all_working_directory_
changes=True): |
143 _log.error("Your source control manager does not support local commits."
) | 143 _log.error("Your source control manager does not support local commits."
) |
144 sys.exit(1) | 144 sys.exit(1) |
OLD | NEW |