Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: git_nav_downstream.py

Issue 277003002: Make git-nav-downstream not print a stack if you Ctrl-C it. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698