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

Side by Side Diff: gcl.py

Issue 8404044: Fixed slight bug in CMDpassthru where the command name was being passed to the CL Load rather tha... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 9 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 os.rename(src_file, dst_file) 1332 os.rename(src_file, dst_file)
1333 print "Change '%s' renamed '%s'." % (src, dst) 1333 print "Change '%s' renamed '%s'." % (src, dst)
1334 return 0 1334 return 0
1335 1335
1336 1336
1337 def CMDpassthru(args): 1337 def CMDpassthru(args):
1338 """Everything else that is passed into gcl we redirect to svn. 1338 """Everything else that is passed into gcl we redirect to svn.
1339 1339
1340 It assumes a change list name is passed and is converted with the files names. 1340 It assumes a change list name is passed and is converted with the files names.
1341 """ 1341 """
1342 cl_name = args[1]
1342 args = ["svn", args[0]] 1343 args = ["svn", args[0]]
1343 if len(args) > 1: 1344 if len(args) > 1:
1344 root = GetRepositoryRoot() 1345 root = GetRepositoryRoot()
1345 change_info = ChangeInfo.Load(args[1], root, True, True) 1346 change_info = ChangeInfo.Load(cl_name, root, True, True)
1346 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) 1347 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()])
1347 return RunShellWithReturnCode(args, print_output=True)[1] 1348 return RunShellWithReturnCode(args, print_output=True)[1]
1348 1349
1349 1350
1350 def Command(name): 1351 def Command(name):
1351 return getattr(sys.modules[__name__], 'CMD' + name, None) 1352 return getattr(sys.modules[__name__], 'CMD' + name, None)
1352 1353
1353 1354
1354 def GenUsage(command): 1355 def GenUsage(command):
1355 """Modify an OptParse object with the function's documentation.""" 1356 """Modify an OptParse object with the function's documentation."""
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 raise 1435 raise
1435 print >> sys.stderr, ( 1436 print >> sys.stderr, (
1436 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 1437 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
1437 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) 1438 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))
1438 return 1 1439 return 1
1439 1440
1440 1441
1441 if __name__ == "__main__": 1442 if __name__ == "__main__":
1442 fix_encoding.fix_encoding() 1443 fix_encoding.fix_encoding()
1443 sys.exit(main(sys.argv[1:])) 1444 sys.exit(main(sys.argv[1:]))
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