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

Side by Side Diff: trychange.py

Issue 7894003: Allow a trailing slash in the rietveld url. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« 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 (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """Client-side script to send a try job to the try server. It communicates to 6 """Client-side script to send a try job to the try server. It communicates to
7 the try server by either writting to a svn repository or by directly connecting 7 the try server by either writting to a svn repository or by directly connecting
8 to the server by HTTP. 8 to the server by HTTP.
9 """ 9 """
10 10
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 logging.debug(argv) 632 logging.debug(argv)
633 633
634 # Strip off any @ in the user, otherwise svn gets confused. 634 # Strip off any @ in the user, otherwise svn gets confused.
635 options.user = options.user.split('@', 1)[0] 635 options.user = options.user.split('@', 1)[0]
636 636
637 if options.rietveld_url: 637 if options.rietveld_url:
638 # Try to extract the review number if possible and fix the protocol. 638 # Try to extract the review number if possible and fix the protocol.
639 if not '://' in options.rietveld_url: 639 if not '://' in options.rietveld_url:
640 options.rietveld_url = 'http://' + options.rietveld_url 640 options.rietveld_url = 'http://' + options.rietveld_url
641 match = re.match(r'^(.*)/(\d+)$', options.rietveld_url) 641 match = re.match(r'^(.*)/(\d+)/?$', options.rietveld_url)
642 if match: 642 if match:
643 if options.issue or options.patchset: 643 if options.issue or options.patchset:
644 parser.error('Cannot use both --issue and use a review number url') 644 parser.error('Cannot use both --issue and use a review number url')
645 options.issue = int(match.group(2)) 645 options.issue = int(match.group(2))
646 options.rietveld_url = match.group(1) 646 options.rietveld_url = match.group(1)
647 647
648 try: 648 try:
649 # Always include os.getcwd() in the checkout settings. 649 # Always include os.getcwd() in the checkout settings.
650 checkouts = [] 650 checkouts = []
651 path = os.getcwd() 651 path = os.getcwd()
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 return 1 761 return 1
762 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 762 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
763 print >> sys.stderr, e 763 print >> sys.stderr, e
764 return 1 764 return 1
765 return 0 765 return 0
766 766
767 767
768 if __name__ == "__main__": 768 if __name__ == "__main__":
769 fix_encoding.fix_encoding() 769 fix_encoding.fix_encoding()
770 sys.exit(TryChange(None, [], False)) 770 sys.exit(TryChange(None, [], False))
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