Chromium Code Reviews| 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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1109 return 0 | 1109 return 0 |
| 1110 if command == "help": | 1110 if command == "help": |
| 1111 Help(argv[2:]) | 1111 Help(argv[2:]) |
| 1112 return 0 | 1112 return 0 |
| 1113 if command == "diff" and len(argv) == 2: | 1113 if command == "diff" and len(argv) == 2: |
| 1114 files = GetFilesNotInCL() | 1114 files = GetFilesNotInCL() |
| 1115 print GenerateDiff([x[1] for x in files]) | 1115 print GenerateDiff([x[1] for x in files]) |
| 1116 return 0 | 1116 return 0 |
| 1117 if command == "settings": | 1117 if command == "settings": |
| 1118 ignore = GetCodeReviewSetting("UNKNOWN"); | 1118 ignore = GetCodeReviewSetting("UNKNOWN"); |
| 1119 print CODEREVIEW_SETTINGS | 1119 del CODEREVIEW_SETTINGS['__just_initialized'] |
|
Nicolas Sylvain
2009/06/12 02:43:32
really? del? can't you use like .erase, or someth
| |
| 1120 print '\n'.join(("%s: %s" % (str(k), str(v)) | |
| 1121 for (k,v) in CODEREVIEW_SETTINGS.iteritems())) | |
| 1120 return 0 | 1122 return 0 |
| 1121 | 1123 |
| 1122 if len(argv) == 2: | 1124 if len(argv) == 2: |
| 1123 if command == "change": | 1125 if command == "change": |
| 1124 # Generate a random changelist name. | 1126 # Generate a random changelist name. |
| 1125 changename = GenerateChangeName() | 1127 changename = GenerateChangeName() |
| 1126 else: | 1128 else: |
| 1127 ErrorExit("Need a changelist name.") | 1129 ErrorExit("Need a changelist name.") |
| 1128 else: | 1130 else: |
| 1129 changename = argv[2] | 1131 changename = argv[2] |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1170 # the files. This allows commands such as 'gcl diff xxx' to work. | 1172 # the files. This allows commands such as 'gcl diff xxx' to work. |
| 1171 args =["svn", command] | 1173 args =["svn", command] |
| 1172 root = GetRepositoryRoot() | 1174 root = GetRepositoryRoot() |
| 1173 args.extend([os.path.join(root, x) for x in change_info.FileList()]) | 1175 args.extend([os.path.join(root, x) for x in change_info.FileList()]) |
| 1174 RunShell(args, True) | 1176 RunShell(args, True) |
| 1175 return 0 | 1177 return 0 |
| 1176 | 1178 |
| 1177 | 1179 |
| 1178 if __name__ == "__main__": | 1180 if __name__ == "__main__": |
| 1179 sys.exit(main()) | 1181 sys.exit(main()) |
| OLD | NEW |