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

Unified Diff: git_cl.py

Issue 92533002: Add --open option to git cl issue. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
===================================================================
--- git_cl.py (revision 238137)
+++ git_cl.py (working copy)
@@ -21,6 +21,7 @@
import threading
import urllib2
import urlparse
+import webbrowser
try:
import readline # pylint: disable=F0401,W0611
@@ -2133,7 +2134,6 @@
_, args = parser.parse_args(args)
if len(args) > 1:
parser.error('Unrecognized args: %s' % ' '.join(args))
- return 0
cl = Changelist()
if args:
@@ -2146,6 +2146,21 @@
return 0
+def CMDweb(parser, args):
+ """Opens the current CL in the web browser."""
+ _, args = parser.parse_args(args)
+ if args:
+ parser.error('Unrecognized args: %s' % ' '.join(args))
+
+ issue_url = Changelist().GetIssueURL()
+ if not issue_url:
+ print >> sys.stderr, 'ERROR No issue to open'
+ return 1
+
+ webbrowser.open(issue_url)
+ return 0
+
+
def CMDset_commit(parser, args):
"""Sets the commit bit to trigger the Commit Queue."""
_, args = parser.parse_args(args)
« 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