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

Side by Side Diff: trychange.py

Issue 332014: Try to clarify "gcl help try" some. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 2 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 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 """Client-side script to send a try job to the try server. It communicates to 5 """Client-side script to send a try job to the try server. It communicates to
6 the try server by either writting to a svn repository or by directly connecting 6 the try server by either writting to a svn repository or by directly connecting
7 to the server by HTTP. 7 to the server by HTTP.
8 """ 8 """
9 9
10 10
(...skipping 14 matching lines...) Expand all
25 import gclient 25 import gclient
26 import gclient_scm 26 import gclient_scm
27 import presubmit_support 27 import presubmit_support
28 import upload 28 import upload
29 29
30 __version__ = '1.1.1' 30 __version__ = '1.1.1'
31 31
32 32
33 # Constants 33 # Constants
34 HELP_STRING = "Sorry, Tryserver is not available." 34 HELP_STRING = "Sorry, Tryserver is not available."
35 USAGE = r"""%prog [options] 35 USAGE = r"""%prog [change_name] [options]
36 36
37 Client-side script to send a try job to the try server. It communicates to 37 Client-side script to send a try job to the try server. It communicates to
38 the try server by either writting to a svn repository or by directly connecting 38 the try server by either writting to a svn repository or by directly connecting
39 to the server by HTTP. 39 to the server by HTTP.
40 40
41 41
42 Examples: 42 Examples:
43 Try a change against a particular revision:
44 %prog change_name -r 123
45
43 A git patch off a web site (git inserts a/ and b/) and fix the base dir: 46 A git patch off a web site (git inserts a/ and b/) and fix the base dir:
44 %prog --url http://url/to/patch.diff --patchlevel 1 --root src 47 %prog --url http://url/to/patch.diff --patchlevel 1 --root src
45 48
46 Use svn to store the try job, specify an alternate email address and use a 49 Use svn to store the try job, specify an alternate email address and use a
47 premade diff file on the local drive: 50 premade diff file on the local drive:
48 %prog --email user@example.com 51 %prog --email user@example.com
49 --svn_repo svn://svn.chromium.org/chrome-try/try --diff foo.diff 52 --svn_repo svn://svn.chromium.org/chrome-try/try --diff foo.diff
50 53
51 Running only on a 'mac' slave with revision src@123 and clobber first; specify 54 Running only on a 'mac' slave with revision 123 and clobber first; specify
52 manually the 3 source files to use for the try job: 55 manually the 3 source files to use for the try job:
53 %prog --bot mac --revision src@123 --clobber -f src/a.cc -f src/a.h 56 %prog --bot mac --revision 123 --clobber -f src/a.cc -f src/a.h
54 -f include/b.h 57 -f include/b.h
55 58
56 """ 59 """
57 60
58 class InvalidScript(Exception): 61 class InvalidScript(Exception):
59 def __str__(self): 62 def __str__(self):
60 return self.args[0] + '\n' + HELP_STRING 63 return self.args[0] + '\n' + HELP_STRING
61 64
62 65
63 class NoTryServerAccess(Exception): 66 class NoTryServerAccess(Exception):
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 if patch_name == 'Unnamed': 589 if patch_name == 'Unnamed':
587 print "Note: use --name NAME to change the try's name." 590 print "Note: use --name NAME to change the try's name."
588 except (InvalidScript, NoTryServerAccess), e: 591 except (InvalidScript, NoTryServerAccess), e:
589 if swallow_exception: 592 if swallow_exception:
590 return 593 return
591 print e 594 print e
592 595
593 596
594 if __name__ == "__main__": 597 if __name__ == "__main__":
595 TryChange(None, None, False) 598 TryChange(None, 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