| 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 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 # argument to trychange.py. | 1276 # argument to trychange.py. |
| 1277 if change_info.GetFiles(): | 1277 if change_info.GetFiles(): |
| 1278 args = argv[3:] | 1278 args = argv[3:] |
| 1279 else: | 1279 else: |
| 1280 change_info = None | 1280 change_info = None |
| 1281 args = argv[2:] | 1281 args = argv[2:] |
| 1282 TryChange(change_info, args, swallow_exception=False) | 1282 TryChange(change_info, args, swallow_exception=False) |
| 1283 else: | 1283 else: |
| 1284 # Everything else that is passed into gcl we redirect to svn, after adding | 1284 # Everything else that is passed into gcl we redirect to svn, after adding |
| 1285 # the files. This allows commands such as 'gcl diff xxx' to work. | 1285 # the files. This allows commands such as 'gcl diff xxx' to work. |
| 1286 if command == "diff" and not change_info.GetFileNames(): |
| 1287 return 0 |
| 1286 args =["svn", command] | 1288 args =["svn", command] |
| 1287 root = GetRepositoryRoot() | 1289 root = GetRepositoryRoot() |
| 1288 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) | 1290 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) |
| 1289 RunShell(args, True) | 1291 RunShell(args, True) |
| 1290 return 0 | 1292 return 0 |
| 1291 | 1293 |
| 1292 | 1294 |
| 1293 if __name__ == "__main__": | 1295 if __name__ == "__main__": |
| 1294 sys.exit(main()) | 1296 sys.exit(main()) |
| OLD | NEW |