Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: gcl.py

Issue 388001: Make 'gcl diff emptychange' show nothing if given change, |emptychange|, does... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698