| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 # Revert them all at once. | 242 # Revert them all at once. |
| 243 if files_to_revert: | 243 if files_to_revert: |
| 244 accumulated_paths = [] | 244 accumulated_paths = [] |
| 245 accumulated_length = 0 | 245 accumulated_length = 0 |
| 246 command = ['revert'] | 246 command = ['revert'] |
| 247 for p in files_to_revert: | 247 for p in files_to_revert: |
| 248 # Some shell have issues with command lines too long. | 248 # Some shell have issues with command lines too long. |
| 249 if accumulated_length and accumulated_length + len(p) > 3072: | 249 if accumulated_length and accumulated_length + len(p) > 3072: |
| 250 RunSVN(command + accumulated_paths, | 250 RunSVN(command + accumulated_paths, |
| 251 os.path.join(self._root_dir, self.relpath)) | 251 os.path.join(self._root_dir, self.relpath)) |
| 252 accumulated_paths = [] | 252 accumulated_paths = [p] |
| 253 accumulated_length = 0 | 253 accumulated_length = len(p) |
| 254 else: | 254 else: |
| 255 accumulated_paths.append(p) | 255 accumulated_paths.append(p) |
| 256 accumulated_length += len(p) | 256 accumulated_length += len(p) |
| 257 if accumulated_paths: | 257 if accumulated_paths: |
| 258 RunSVN(command + accumulated_paths, | 258 RunSVN(command + accumulated_paths, |
| 259 os.path.join(self._root_dir, self.relpath)) | 259 os.path.join(self._root_dir, self.relpath)) |
| 260 | 260 |
| 261 def status(self, options, args, file_list): | 261 def status(self, options, args, file_list): |
| 262 """Display status information.""" | 262 """Display status information.""" |
| 263 path = os.path.join(self._root_dir, self.relpath) | 263 path = os.path.join(self._root_dir, self.relpath) |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 xml_props_status) | 568 xml_props_status) |
| 569 # Col 2 | 569 # Col 2 |
| 570 if wc_status[0].getAttribute('wc-locked') == 'true': | 570 if wc_status[0].getAttribute('wc-locked') == 'true': |
| 571 statuses[2] = 'L' | 571 statuses[2] = 'L' |
| 572 # Col 3 | 572 # Col 3 |
| 573 if wc_status[0].getAttribute('copied') == 'true': | 573 if wc_status[0].getAttribute('copied') == 'true': |
| 574 statuses[3] = '+' | 574 statuses[3] = '+' |
| 575 item = (''.join(statuses), file) | 575 item = (''.join(statuses), file) |
| 576 results.append(item) | 576 results.append(item) |
| 577 return results | 577 return results |
| OLD | NEW |