OLD | NEW |
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 Loading... |
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 Loading... |
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() |
OLD | NEW |