| 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 """\ | 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 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 | 1159 |
| 1160 @attrs(usage='<svn options>') | 1160 @attrs(usage='<svn options>') |
| 1161 def CMDdiff(args): | 1161 def CMDdiff(args): |
| 1162 """Diffs all files in the changelist or all files that aren't in a CL.""" | 1162 """Diffs all files in the changelist or all files that aren't in a CL.""" |
| 1163 files = None | 1163 files = None |
| 1164 if args: | 1164 if args: |
| 1165 change_info = ChangeInfo.Load(args.pop(0), GetRepositoryRoot(), True, True) | 1165 change_info = ChangeInfo.Load(args.pop(0), GetRepositoryRoot(), True, True) |
| 1166 files = change_info.GetFileNames() | 1166 files = change_info.GetFileNames() |
| 1167 else: | 1167 else: |
| 1168 files = GetFilesNotInCL() | 1168 files = GetFilesNotInCL() |
| 1169 return RunShellWithReturnCode(['svn', 'diff'] + files + args, | 1169 |
| 1170 print_output=True)[1] | 1170 root = GetRepositoryRoot() |
| 1171 cmd = ['svn', 'diff'] |
| 1172 cmd.extend([os.path.join(root, x) for x in files]) |
| 1173 cmd.extend(args) |
| 1174 return RunShellWithReturnCode(cmd, print_output=True)[1] |
| 1171 | 1175 |
| 1172 | 1176 |
| 1173 @no_args | 1177 @no_args |
| 1174 def CMDsettings(): | 1178 def CMDsettings(): |
| 1175 """Prints code review settings for this checkout.""" | 1179 """Prints code review settings for this checkout.""" |
| 1176 # Force load settings | 1180 # Force load settings |
| 1177 GetCodeReviewSetting("UNKNOWN"); | 1181 GetCodeReviewSetting("UNKNOWN"); |
| 1178 del CODEREVIEW_SETTINGS['__just_initialized'] | 1182 del CODEREVIEW_SETTINGS['__just_initialized'] |
| 1179 print '\n'.join(("%s: %s" % (str(k), str(v)) | 1183 print '\n'.join(("%s: %s" % (str(k), str(v)) |
| 1180 for (k,v) in CODEREVIEW_SETTINGS.iteritems())) | 1184 for (k,v) in CODEREVIEW_SETTINGS.iteritems())) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 argv = ['help'] | 1317 argv = ['help'] |
| 1314 command = Command(argv[0]) | 1318 command = Command(argv[0]) |
| 1315 if command: | 1319 if command: |
| 1316 return command(argv[1:]) | 1320 return command(argv[1:]) |
| 1317 # Unknown command, try to pass that to svn | 1321 # Unknown command, try to pass that to svn |
| 1318 return CMDpassthru(argv) | 1322 return CMDpassthru(argv) |
| 1319 | 1323 |
| 1320 | 1324 |
| 1321 if __name__ == "__main__": | 1325 if __name__ == "__main__": |
| 1322 sys.exit(main(sys.argv[1:])) | 1326 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |