OLD | NEW |
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 """\ | 6 """\ |
7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
8 of files. | 8 of files. |
9 """ | 9 """ |
10 | 10 |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 # argument to trychange.py. | 1302 # argument to trychange.py. |
1303 # When the command is 'try' and --patchset is used, the patch to try | 1303 # When the command is 'try' and --patchset is used, the patch to try |
1304 # is on the Rietveld server. | 1304 # is on the Rietveld server. |
1305 if not args: | 1305 if not args: |
1306 ErrorExit("You need to pass a change list name") | 1306 ErrorExit("You need to pass a change list name") |
1307 if args[0].find(',') != -1: | 1307 if args[0].find(',') != -1: |
1308 change_info = LoadChangelistInfoForMultiple(args[0], GetRepositoryRoot(), | 1308 change_info = LoadChangelistInfoForMultiple(args[0], GetRepositoryRoot(), |
1309 True, True) | 1309 True, True) |
1310 else: | 1310 else: |
1311 change_info = ChangeInfo.Load(args[0], GetRepositoryRoot(), | 1311 change_info = ChangeInfo.Load(args[0], GetRepositoryRoot(), |
1312 False, True) | 1312 True, True) |
1313 if change_info.GetFiles(): | 1313 if change_info.GetFiles(): |
1314 args = args[1:] | 1314 args = args[1:] |
1315 else: | 1315 else: |
1316 change_info = None | 1316 change_info = None |
1317 return TryChange(change_info, args, swallow_exception=False) | 1317 return TryChange(change_info, args, swallow_exception=False) |
1318 | 1318 |
1319 | 1319 |
1320 @attrs(usage='<old-name> <new-name>') | 1320 @attrs(usage='<old-name> <new-name>') |
1321 def CMDrename(args): | 1321 def CMDrename(args): |
1322 """Renames an existing change.""" | 1322 """Renames an existing change.""" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 raise | 1438 raise |
1439 print >> sys.stderr, ( | 1439 print >> sys.stderr, ( |
1440 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1440 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1441 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1441 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1442 return 1 | 1442 return 1 |
1443 | 1443 |
1444 | 1444 |
1445 if __name__ == "__main__": | 1445 if __name__ == "__main__": |
1446 fix_encoding.fix_encoding() | 1446 fix_encoding.fix_encoding() |
1447 sys.exit(main(sys.argv[1:])) | 1447 sys.exit(main(sys.argv[1:])) |
OLD | NEW |