| 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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 | 1158 |
| 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 = [f[1] for f in GetFilesNotInCL()] |
| 1169 | 1169 |
| 1170 root = GetRepositoryRoot() | 1170 root = GetRepositoryRoot() |
| 1171 cmd = ['svn', 'diff'] | 1171 cmd = ['svn', 'diff'] |
| 1172 cmd.extend([os.path.join(root, x) for x in files]) | 1172 cmd.extend([os.path.join(root, x) for x in files]) |
| 1173 cmd.extend(args) | 1173 cmd.extend(args) |
| 1174 return RunShellWithReturnCode(cmd, print_output=True)[1] | 1174 return RunShellWithReturnCode(cmd, print_output=True)[1] |
| 1175 | 1175 |
| 1176 | 1176 |
| 1177 @no_args | 1177 @no_args |
| 1178 def CMDsettings(): | 1178 def CMDsettings(): |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 argv = ['help'] | 1317 argv = ['help'] |
| 1318 command = Command(argv[0]) | 1318 command = Command(argv[0]) |
| 1319 if command: | 1319 if command: |
| 1320 return command(argv[1:]) | 1320 return command(argv[1:]) |
| 1321 # Unknown command, try to pass that to svn | 1321 # Unknown command, try to pass that to svn |
| 1322 return CMDpassthru(argv) | 1322 return CMDpassthru(argv) |
| 1323 | 1323 |
| 1324 | 1324 |
| 1325 if __name__ == "__main__": | 1325 if __name__ == "__main__": |
| 1326 sys.exit(main(sys.argv[1:])) | 1326 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |