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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 os.getcwd()) | 1510 os.getcwd()) |
1511 sub_deps = self._ParseSolutionDeps( | 1511 sub_deps = self._ParseSolutionDeps( |
1512 deps[d].module_name, | 1512 deps[d].module_name, |
1513 FileRead(os.path.join(self._root_dir, | 1513 FileRead(os.path.join(self._root_dir, |
1514 deps[d].module_name, | 1514 deps[d].module_name, |
1515 self._options.deps_file)), | 1515 self._options.deps_file)), |
1516 {}) | 1516 {}) |
1517 (url, rev) = GetURLAndRev(d, sub_deps[d]) | 1517 (url, rev) = GetURLAndRev(d, sub_deps[d]) |
1518 entries[d] = "%s@%d" % (url, rev) | 1518 entries[d] = "%s@%d" % (url, rev) |
1519 | 1519 |
1520 print(";".join(["%s,%s" % (x, entries[x]) for x in sorted(entries.keys())])) | 1520 print(";\n\n".join(["%s: %s" % (x, entries[x]) for x in sorted(entries.keys(
))])) |
1521 | 1521 |
1522 | 1522 |
1523 ## gclient commands. | 1523 ## gclient commands. |
1524 | 1524 |
1525 | 1525 |
1526 def DoCleanup(options, args): | 1526 def DoCleanup(options, args): |
1527 """Handle the cleanup subcommand. | 1527 """Handle the cleanup subcommand. |
1528 | 1528 |
1529 Raises: | 1529 Raises: |
1530 Error: if client isn't configured properly. | 1530 Error: if client isn't configured properly. |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 "configured solutions")) | 1777 "configured solutions")) |
1778 option_parser.add_option("", "--delete_unversioned_trees", | 1778 option_parser.add_option("", "--delete_unversioned_trees", |
1779 action="store_true", default=False, | 1779 action="store_true", default=False, |
1780 help=("on update, delete any unexpected " | 1780 help=("on update, delete any unexpected " |
1781 "unversioned trees that are in the checkout")) | 1781 "unversioned trees that are in the checkout")) |
1782 | 1782 |
1783 if len(argv) < 2: | 1783 if len(argv) < 2: |
1784 # Users don't need to be told to use the 'help' command. | 1784 # Users don't need to be told to use the 'help' command. |
1785 option_parser.print_help() | 1785 option_parser.print_help() |
1786 return 1 | 1786 return 1 |
| 1787 |
1787 # Add manual support for --version as first argument. | 1788 # Add manual support for --version as first argument. |
1788 if argv[1] == '--version': | 1789 if argv[1] == '--version': |
1789 option_parser.print_version() | 1790 option_parser.print_version() |
1790 return 0 | 1791 return 0 |
1791 | 1792 |
1792 # Add manual support for --help as first argument. | 1793 # Add manual support for --help as first argument. |
1793 if argv[1] == '--help': | 1794 if argv[1] == '--help': |
1794 argv[1] = 'help' | 1795 argv[1] = 'help' |
1795 | 1796 |
1796 command = argv[1] | 1797 command = argv[1] |
(...skipping 14 matching lines...) Expand all Loading... |
1811 | 1812 |
1812 if "__main__" == __name__: | 1813 if "__main__" == __name__: |
1813 try: | 1814 try: |
1814 result = Main(sys.argv) | 1815 result = Main(sys.argv) |
1815 except Error, e: | 1816 except Error, e: |
1816 print >> sys.stderr, "Error: %s" % str(e) | 1817 print >> sys.stderr, "Error: %s" % str(e) |
1817 result = 1 | 1818 result = 1 |
1818 sys.exit(result) | 1819 sys.exit(result) |
1819 | 1820 |
1820 # vim: ts=2:sw=2:tw=80:et: | 1821 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |