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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 self.relpath = relpath | 44 self.relpath = relpath |
45 if self.relpath: | 45 if self.relpath: |
46 self.relpath = self.relpath.replace('/', os.sep) | 46 self.relpath = self.relpath.replace('/', os.sep) |
47 | 47 |
48 def FullUrlForRelativeUrl(self, url): | 48 def FullUrlForRelativeUrl(self, url): |
49 # Find the forth '/' and strip from there. A bit hackish. | 49 # Find the forth '/' and strip from there. A bit hackish. |
50 return '/'.join(self.url.split('/')[:4]) + url | 50 return '/'.join(self.url.split('/')[:4]) + url |
51 | 51 |
52 def RunCommand(self, command, options, args, file_list=None): | 52 def RunCommand(self, command, options, args, file_list=None): |
53 # file_list will have all files that are modified appended to it. | 53 # file_list will have all files that are modified appended to it. |
54 | 54 if file_list is None: |
55 file_list = file_list or [] | 55 file_list = [] |
56 | 56 |
57 commands = { | 57 commands = { |
58 'cleanup': self.cleanup, | 58 'cleanup': self.cleanup, |
59 'export': self.export, | 59 'export': self.export, |
60 'update': self.update, | 60 'update': self.update, |
61 'revert': self.revert, | 61 'revert': self.revert, |
62 'status': self.status, | 62 'status': self.status, |
63 'diff': self.diff, | 63 'diff': self.diff, |
64 'pack': self.pack, | 64 'pack': self.pack, |
65 'runhooks': self.status, | 65 'runhooks': self.status, |
(...skipping 502 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 |