Chromium Code Reviews| Index: trychange.py |
| diff --git a/trychange.py b/trychange.py |
| index b1b328ff2f1fe4534a6d51158443429f8bfcb46d..4a3dce55d555f3a1222c4fd1b5f6b686d591101b 100755 |
| --- a/trychange.py |
| +++ b/trychange.py |
| @@ -370,6 +370,7 @@ def _SendChangeSVN(options): |
| logging.info(options.svn_repo) |
| logging.info(options.diff) |
| if options.dry_run: |
| + print options.diff |
|
M-A Ruel
2011/03/09 15:30:34
It's assumed that --dry-run is used with --verbose
Bernhard Bauer
2011/03/09 15:55:11
I see. I wanted to make it analog to _SendChangeHT
|
| return |
| # Create a temporary directory, put a uniquely named file in it with the diff |
| @@ -611,22 +612,19 @@ def TryChange(argv, |
| options, args = parser.parse_args(argv) |
| - # Note that the args array includes the script name, so |
| - # a single argument results in len(args) == 2. |
| - |
| # If they've asked for help, give it to them |
| - if len(args) == 2 and args[1] == 'help': |
| + if len(args) == 1 and args[0] == 'help': |
| parser.print_help() |
| return 0 |
| # If they've said something confusing, don't spawn a try job until you |
| # understand what they want. |
| - if len(args) > 1: |
| + if len(args) > 0: |
|
M-A Ruel
2011/03/09 15:30:34
Ugh, this code is ugly. Since you're touching it a
Bernhard Bauer
2011/03/09 15:55:11
Done.
|
| plural = "" |
| - if len(args) > 2: |
| + if len(args) > 1: |
| plural = "s" |
| print >> sys.stderr, ( |
| - 'Argument%s \"%s\" not understood' % (plural, ' '.join(args[1:]))) |
| + 'Argument%s \"%s\" not understood' % (plural, ' '.join(args))) |
| parser.print_help() |
| return 1 |