OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |