Chromium Code Reviews| Index: git_cl.py |
| =================================================================== |
| --- git_cl.py (revision 237490) |
| +++ git_cl.py (working copy) |
| @@ -21,6 +21,7 @@ |
| import threading |
| import urllib2 |
| import urlparse |
| +import webbrowser |
| try: |
| import readline # pylint: disable=F0401,W0611 |
| @@ -2147,6 +2148,22 @@ |
| 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)) |
| + return 0 |
|
M-A Ruel
2013/12/02 21:57:57
Remove this line since it's not needed, parser.err
Lei Zhang
2013/12/02 22:00:34
Done. I also fixed all the other instances, includ
|
| + |
| + 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) |