| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Meta checkout manager supporting both Subversion and GIT. | 6 """Meta checkout manager supporting both Subversion and GIT. |
| 7 | 7 |
| 8 Files | 8 Files |
| 9 .gclient : Current client configuration, written by 'config' command. | 9 .gclient : Current client configuration, written by 'config' command. |
| 10 Format is a Python script defining 'solutions', a list whose | 10 Format is a Python script defining 'solutions', a list whose |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 deps[d].module_name) | 763 deps[d].module_name) |
| 764 sub_deps_base_url = deps[deps[d].module_name] | 764 sub_deps_base_url = deps[deps[d].module_name] |
| 765 sub_deps = Dependency(self, deps[d].module_name, sub_deps_base_url | 765 sub_deps = Dependency(self, deps[d].module_name, sub_deps_base_url |
| 766 ).ParseDepsFile(False) | 766 ).ParseDepsFile(False) |
| 767 url = deps[d].GetUrl(d, sub_deps_base_url, self.root_dir(), sub_deps) | 767 url = deps[d].GetUrl(d, sub_deps_base_url, self.root_dir(), sub_deps) |
| 768 entries[d] = GetURLAndRev(d, url) | 768 entries[d] = GetURLAndRev(d, url) |
| 769 | 769 |
| 770 # Build the snapshot configuration string | 770 # Build the snapshot configuration string |
| 771 if self._options.snapshot: | 771 if self._options.snapshot: |
| 772 url = entries.pop(name) | 772 url = entries.pop(name) |
| 773 | |
| 774 # Build the snapshot configuration string | |
| 775 if self._options.snapshot: | |
| 776 url = entries.pop(name) | |
| 777 custom_deps = ''.join([' \"%s\": \"%s\",\n' % (x, entries[x]) | 773 custom_deps = ''.join([' \"%s\": \"%s\",\n' % (x, entries[x]) |
| 778 for x in sorted(entries.keys())]) | 774 for x in sorted(entries.keys())]) |
| 779 | 775 |
| 780 new_gclient += self.DEFAULT_SNAPSHOT_SOLUTION_TEXT % { | 776 new_gclient += self.DEFAULT_SNAPSHOT_SOLUTION_TEXT % { |
| 781 'solution_name': name, | 777 'solution_name': name, |
| 782 'solution_url': url, | 778 'solution_url': url, |
| 783 'safesync_url' : '', | 779 'safesync_url' : '', |
| 784 'solution_deps': custom_deps, | 780 'solution_deps': custom_deps, |
| 785 } | 781 } |
| 786 else: | 782 else: |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 return CMDhelp(parser, argv) | 1201 return CMDhelp(parser, argv) |
| 1206 except gclient_utils.Error, e: | 1202 except gclient_utils.Error, e: |
| 1207 print >> sys.stderr, 'Error: %s' % str(e) | 1203 print >> sys.stderr, 'Error: %s' % str(e) |
| 1208 return 1 | 1204 return 1 |
| 1209 | 1205 |
| 1210 | 1206 |
| 1211 if '__main__' == __name__: | 1207 if '__main__' == __name__: |
| 1212 sys.exit(Main(sys.argv[1:])) | 1208 sys.exit(Main(sys.argv[1:])) |
| 1213 | 1209 |
| 1214 # vim: ts=2:sw=2:tw=80:et: | 1210 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |