OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-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 | 5 |
6 """Wrapper script around Rietveld's upload.py that groups files into | 6 """Wrapper script around Rietveld's upload.py that groups files into |
7 changelists.""" | 7 changelists.""" |
8 | 8 |
9 import getpass | 9 import getpass |
10 import os | 10 import os |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 gcl diff change_name | 654 gcl diff change_name |
655 Diffs all files in the changelist. | 655 Diffs all files in the changelist. |
656 | 656 |
657 gcl presubmit change_name | 657 gcl presubmit change_name |
658 Runs presubmit checks without uploading the changelist. | 658 Runs presubmit checks without uploading the changelist. |
659 | 659 |
660 gcl diff | 660 gcl diff |
661 Diffs all files in the current directory and subdirectories that aren't in | 661 Diffs all files in the current directory and subdirectories that aren't in |
662 a changelist. | 662 a changelist. |
663 | 663 |
| 664 gcl description |
| 665 Prints the description of the specified change to stdout. |
| 666 |
664 gcl changes | 667 gcl changes |
665 Lists all the the changelists and the files in them. | 668 Lists all the the changelists and the files in them. |
666 | 669 |
667 gcl rename <old-name> <new-name> | 670 gcl rename <old-name> <new-name> |
668 Renames an existing change. | 671 Renames an existing change. |
669 | 672 |
670 gcl nothave [optional directory] | 673 gcl nothave [optional directory] |
671 Lists files unknown to Subversion. | 674 Lists files unknown to Subversion. |
672 | 675 |
673 gcl opened | 676 gcl opened |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 fail_on_not_found = command != "try" and command != "change" | 1215 fail_on_not_found = command != "try" and command != "change" |
1213 if command == "try" and changename.find(',') != -1: | 1216 if command == "try" and changename.find(',') != -1: |
1214 change_info = LoadChangelistInfoForMultiple(changename, GetRepositoryRoot(), | 1217 change_info = LoadChangelistInfoForMultiple(changename, GetRepositoryRoot(), |
1215 True, True) | 1218 True, True) |
1216 else: | 1219 else: |
1217 change_info = ChangeInfo.Load(changename, GetRepositoryRoot(), | 1220 change_info = ChangeInfo.Load(changename, GetRepositoryRoot(), |
1218 fail_on_not_found, True) | 1221 fail_on_not_found, True) |
1219 | 1222 |
1220 if command == "change": | 1223 if command == "change": |
1221 Change(change_info, argv[3:]) | 1224 Change(change_info, argv[3:]) |
| 1225 if command == "description": |
| 1226 print change_info.description |
1222 elif command == "lint": | 1227 elif command == "lint": |
1223 Lint(change_info, argv[3:]) | 1228 Lint(change_info, argv[3:]) |
1224 elif command == "upload": | 1229 elif command == "upload": |
1225 UploadCL(change_info, argv[3:]) | 1230 UploadCL(change_info, argv[3:]) |
1226 elif command == "presubmit": | 1231 elif command == "presubmit": |
1227 PresubmitCL(change_info) | 1232 PresubmitCL(change_info) |
1228 elif command in ("commit", "submit"): | 1233 elif command in ("commit", "submit"): |
1229 Commit(change_info, argv[3:]) | 1234 Commit(change_info, argv[3:]) |
1230 elif command == "delete": | 1235 elif command == "delete": |
1231 change_info.Delete() | 1236 change_info.Delete() |
(...skipping 13 matching lines...) Expand all Loading... |
1245 return 0 | 1250 return 0 |
1246 args =["svn", command] | 1251 args =["svn", command] |
1247 root = GetRepositoryRoot() | 1252 root = GetRepositoryRoot() |
1248 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) | 1253 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) |
1249 RunShell(args, True) | 1254 RunShell(args, True) |
1250 return 0 | 1255 return 0 |
1251 | 1256 |
1252 | 1257 |
1253 if __name__ == "__main__": | 1258 if __name__ == "__main__": |
1254 sys.exit(main()) | 1259 sys.exit(main()) |
OLD | NEW |