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

Side by Side Diff: third_party/upload.py

Issue 6825008: First stab at using Rietveld wrapper object in both gcl.py and git-cl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: small fix Created 9 years, 8 months 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 | « tests/presubmit_unittest.py ('k') | 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 # 2 #
3 # Copyright 2007 Google Inc. 3 # Copyright 2007 Google Inc.
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 Args: 2061 Args:
2062 argv: Command line arguments. 2062 argv: Command line arguments.
2063 data: Diff contents. If None (default) the diff is generated by 2063 data: Diff contents. If None (default) the diff is generated by
2064 the VersionControlSystem implementation returned by GuessVCS(). 2064 the VersionControlSystem implementation returned by GuessVCS().
2065 2065
2066 Returns: 2066 Returns:
2067 A 2-tuple (issue id, patchset id). 2067 A 2-tuple (issue id, patchset id).
2068 The patchset id is None if the base files are not uploaded by this 2068 The patchset id is None if the base files are not uploaded by this
2069 script (applies only to SVN checkouts). 2069 script (applies only to SVN checkouts).
2070 """ 2070 """
2071 logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:"
2072 "%(lineno)s %(message)s "))
2073 os.environ['LC_ALL'] = 'C'
2074 options, args = parser.parse_args(argv[1:]) 2071 options, args = parser.parse_args(argv[1:])
2075 global verbosity 2072 global verbosity
2076 verbosity = options.verbose 2073 verbosity = options.verbose
2077 if verbosity >= 3: 2074 if verbosity >= 3:
2078 logging.getLogger().setLevel(logging.DEBUG) 2075 logging.getLogger().setLevel(logging.DEBUG)
2079 elif verbosity >= 2: 2076 elif verbosity >= 2:
2080 logging.getLogger().setLevel(logging.INFO) 2077 logging.getLogger().setLevel(logging.INFO)
2081 2078
2082 vcs = GuessVCS(options) 2079 vcs = GuessVCS(options)
2083 2080
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 try: 2209 try:
2213 RealMain(sys.argv) 2210 RealMain(sys.argv)
2214 except KeyboardInterrupt: 2211 except KeyboardInterrupt:
2215 print 2212 print
2216 StatusUpdate("Interrupted.") 2213 StatusUpdate("Interrupted.")
2217 sys.exit(1) 2214 sys.exit(1)
2218 2215
2219 2216
2220 if __name__ == "__main__": 2217 if __name__ == "__main__":
2221 main() 2218 main()
OLDNEW
« no previous file with comments | « tests/presubmit_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698