| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """ | 6 """ |
| 7 Checks out a downstream branch from the currently checked out branch. If there | 7 Checks out a downstream branch from the currently checked out branch. If there |
| 8 is more than one downstream branch, then this script will prompt you to select | 8 is more than one downstream branch, then this script will prompt you to select |
| 9 which branch. | 9 which branch. |
| 10 """ | 10 """ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 r = raw_input(prompt).strip() or '0' | 51 r = raw_input(prompt).strip() or '0' |
| 52 if not r.isdigit() or (0 > int(r) > high): | 52 if not r.isdigit() or (0 > int(r) > high): |
| 53 print "Invalid choice." | 53 print "Invalid choice." |
| 54 else: | 54 else: |
| 55 run_stream('checkout', downstreams[int(r)], stdout=sys.stdout, | 55 run_stream('checkout', downstreams[int(r)], stdout=sys.stdout, |
| 56 stderr=sys.stderr) | 56 stderr=sys.stderr) |
| 57 break | 57 break |
| 58 | 58 |
| 59 | 59 |
| 60 if __name__ == '__main__': | 60 if __name__ == '__main__': |
| 61 sys.exit(main(sys.argv[1:])) | 61 try: |
| 62 sys.exit(main(sys.argv[1:])) |
| 63 except KeyboardInterrupt: |
| 64 pass |
| OLD | NEW |