OLD | NEW |
1 # Copyright 2009 Google Inc. All Rights Reserved. | 1 # Copyright 2009 Google Inc. All Rights Reserved. |
2 # | 2 # |
3 # Licensed under the Apache License, Version 2.0 (the "License"); | 3 # Licensed under the Apache License, Version 2.0 (the "License"); |
4 # you may not use this file except in compliance with the License. | 4 # you may not use this file except in compliance with the License. |
5 # You may obtain a copy of the License at | 5 # You may obtain a copy of the License at |
6 # | 6 # |
7 # http://www.apache.org/licenses/LICENSE-2.0 | 7 # http://www.apache.org/licenses/LICENSE-2.0 |
8 # | 8 # |
9 # Unless required by applicable law or agreed to in writing, software | 9 # Unless required by applicable law or agreed to in writing, software |
10 # distributed under the License is distributed on an "AS IS" BASIS, | 10 # distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 # We need to checkout. | 205 # We need to checkout. |
206 command = ['checkout', url, checkout_path] | 206 command = ['checkout', url, checkout_path] |
207 if revision: | 207 if revision: |
208 command.extend(['--revision', str(revision)]) | 208 command.extend(['--revision', str(revision)]) |
209 RunSVNAndGetFileList(command, self._root_dir, file_list) | 209 RunSVNAndGetFileList(command, self._root_dir, file_list) |
210 return | 210 return |
211 | 211 |
212 | 212 |
213 # If the provided url has a revision number that matches the revision | 213 # If the provided url has a revision number that matches the revision |
214 # number of the existing directory, then we don't need to bother updating. | 214 # number of the existing directory, then we don't need to bother updating. |
215 if not options.force and from_info['Revision'] == revision: | 215 if not options.force and str(from_info['Revision']) == revision: |
216 if options.verbose or not forced_revision: | 216 if options.verbose or not forced_revision: |
217 print("\n_____ %s%s" % (self.relpath, rev_str)) | 217 print("\n_____ %s%s" % (self.relpath, rev_str)) |
218 return | 218 return |
219 | 219 |
220 command = ["update", checkout_path] | 220 command = ["update", checkout_path] |
221 if revision: | 221 if revision: |
222 command.extend(['--revision', str(revision)]) | 222 command.extend(['--revision', str(revision)]) |
223 RunSVNAndGetFileList(command, self._root_dir, file_list) | 223 RunSVNAndGetFileList(command, self._root_dir, file_list) |
224 | 224 |
225 def revert(self, options, args, file_list): | 225 def revert(self, options, args, file_list): |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 # Col 3 | 589 # Col 3 |
590 if wc_status[0].getAttribute('copied') == 'true': | 590 if wc_status[0].getAttribute('copied') == 'true': |
591 statuses[3] = '+' | 591 statuses[3] = '+' |
592 # Col 4 | 592 # Col 4 |
593 if wc_status[0].getAttribute('switched') == 'true': | 593 if wc_status[0].getAttribute('switched') == 'true': |
594 statuses[4] = 'S' | 594 statuses[4] = 'S' |
595 # TODO(maruel): Col 5 and 6 | 595 # TODO(maruel): Col 5 and 6 |
596 item = (''.join(statuses), file) | 596 item = (''.join(statuses), file) |
597 results.append(item) | 597 results.append(item) |
598 return results | 598 return results |
OLD | NEW |