OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 parser = Parser() | 1770 parser = Parser() |
1771 if argv: | 1771 if argv: |
1772 command = Command(argv[0]) | 1772 command = Command(argv[0]) |
1773 if command: | 1773 if command: |
1774 # 'fix' the usage and the description now that we know the subcommand. | 1774 # 'fix' the usage and the description now that we know the subcommand. |
1775 GenUsage(parser, argv[0]) | 1775 GenUsage(parser, argv[0]) |
1776 return command(parser, argv[1:]) | 1776 return command(parser, argv[1:]) |
1777 # Not a known command. Default to help. | 1777 # Not a known command. Default to help. |
1778 GenUsage(parser, 'help') | 1778 GenUsage(parser, 'help') |
1779 return CMDhelp(parser, argv) | 1779 return CMDhelp(parser, argv) |
| 1780 except KeyboardInterrupt: |
| 1781 gclient_utils.GClientChildren.KillAllRemainingChildren() |
| 1782 raise |
1780 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1783 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1781 print >> sys.stderr, 'Error: %s' % str(e) | 1784 print >> sys.stderr, 'Error: %s' % str(e) |
1782 return 1 | 1785 return 1 |
1783 | 1786 |
1784 | 1787 |
1785 if '__main__' == __name__: | 1788 if '__main__' == __name__: |
1786 fix_encoding.fix_encoding() | 1789 fix_encoding.fix_encoding() |
1787 sys.exit(Main(sys.argv[1:])) | 1790 sys.exit(Main(sys.argv[1:])) |
1788 | 1791 |
1789 # vim: ts=2:sw=2:tw=80:et: | 1792 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |