OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright 2008 Google Inc. All Rights Reserved. | 3 # Copyright 2008 Google Inc. All Rights Reserved. |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
806 entries = {} | 806 entries = {} |
807 entries_deps_content = {} | 807 entries_deps_content = {} |
808 | 808 |
809 # Inner helper to generate base url and rev tuple (including honoring | 809 # Inner helper to generate base url and rev tuple (including honoring |
810 # |revision_overrides|) | 810 # |revision_overrides|) |
811 def GetURLAndRev(name, original_url): | 811 def GetURLAndRev(name, original_url): |
812 if original_url.find("@") < 0: | 812 if original_url.find("@") < 0: |
813 if revision_overrides.has_key(name): | 813 if revision_overrides.has_key(name): |
814 return (original_url, revision_overrides[name]) | 814 return (original_url, revision_overrides[name]) |
815 else: | 815 else: |
816 # TODO(aharper): SVN/SCMWrapper cleanup (non-local commandset) | 816 # TODO(aharper): SVN/SCMWrapper cleanup (non-local commandset) |
M-A Ruel
2009/11/05 19:33:35
shouldn't the TODO be removed?
| |
817 return (original_url, | 817 scm = gclient_scm.CreateSCM(solution["url"], self._root_dir, name) |
818 gclient_scm.CaptureSVNHeadRevision(original_url)) | 818 return (original_url, scm.revinfo(self._options, [], None)) |
819 else: | 819 else: |
820 url_components = original_url.split("@") | 820 url_components = original_url.split("@") |
821 if revision_overrides.has_key(name): | 821 if revision_overrides.has_key(name): |
822 return (url_components[0], revision_overrides[name]) | 822 return (url_components[0], revision_overrides[name]) |
823 else: | 823 else: |
824 return (url_components[0], url_components[1]) | 824 return (url_components[0], url_components[1]) |
825 | 825 |
826 # Run on the base solutions first. | 826 # Run on the base solutions first. |
827 for solution in solutions: | 827 for solution in solutions: |
828 name = solution["name"] | 828 name = solution["name"] |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1185 | 1185 |
1186 if "__main__" == __name__: | 1186 if "__main__" == __name__: |
1187 try: | 1187 try: |
1188 result = Main(sys.argv) | 1188 result = Main(sys.argv) |
1189 except Error, e: | 1189 except Error, e: |
1190 print >> sys.stderr, "Error: %s" % str(e) | 1190 print >> sys.stderr, "Error: %s" % str(e) |
1191 result = 1 | 1191 result = 1 |
1192 sys.exit(result) | 1192 sys.exit(result) |
1193 | 1193 |
1194 # vim: ts=2:sw=2:tw=80:et: | 1194 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |