| OLD | NEW |
| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return None | 93 return None |
| 94 | 94 |
| 95 def timestamp_of_revision(self, path, revision): | 95 def timestamp_of_revision(self, path, revision): |
| 96 return '2013-02-01 08:48:05 +0000' | 96 return '2013-02-01 08:48:05 +0000' |
| 97 | 97 |
| 98 def commit_locally_with_message(self, message): | 98 def commit_locally_with_message(self, message): |
| 99 self._local_commits.append([message]) | 99 self._local_commits.append([message]) |
| 100 | 100 |
| 101 def local_commits(self): | 101 def local_commits(self): |
| 102 """For testing purposes, returns the internal recording of commits made
via commit_locally_with_message. | 102 """For testing purposes, returns the internal recording of commits made
via commit_locally_with_message. |
| 103 Format as [ message, commit_all_working_directory_changes, author ].""" | 103 Format as [ message, commit_all_working_directory_changes, author ]. |
| 104 """ |
| 104 return self._local_commits | 105 return self._local_commits |
| 105 | 106 |
| 106 def delete(self, path): | 107 def delete(self, path): |
| 107 return self.delete_list([path]) | 108 return self.delete_list([path]) |
| 108 | 109 |
| 109 def delete_list(self, paths): | 110 def delete_list(self, paths): |
| 110 if not self._filesystem: | 111 if not self._filesystem: |
| 111 return | 112 return |
| 112 for path in paths: | 113 for path in paths: |
| 113 if self._filesystem.exists(path): | 114 if self._filesystem.exists(path): |
| 114 self._filesystem.remove(path) | 115 self._filesystem.remove(path) |
| 115 | 116 |
| 116 def move(self, origin, destination): | 117 def move(self, origin, destination): |
| 117 if self._filesystem: | 118 if self._filesystem: |
| 118 self._filesystem.move(self.absolute_path(origin), self.absolute_path
(destination)) | 119 self._filesystem.move(self.absolute_path(origin), self.absolute_path
(destination)) |
| 119 | 120 |
| 120 def changed_files(self): | 121 def changed_files(self): |
| 121 return [] | 122 return [] |
| OLD | NEW |