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

Side by Side Diff: build/util/lastchange.py

Issue 6265031: lastchange: use shell=True on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « 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) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 lastchange.py -- Chromium revision fetching utility. 7 lastchange.py -- Chromium revision fetching utility.
8 """ 8 """
9 9
10 import optparse 10 import optparse
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 Errors are swallowed. 54 Errors are swallowed.
55 55
56 Returns: 56 Returns:
57 a VersionInfo object or None on error. 57 a VersionInfo object or None on error.
58 """ 58 """
59 try: 59 try:
60 proc = subprocess.Popen(['svn', 'info'], 60 proc = subprocess.Popen(['svn', 'info'],
61 stdout=subprocess.PIPE, 61 stdout=subprocess.PIPE,
62 stderr=subprocess.PIPE, 62 stderr=subprocess.PIPE,
63 cwd=directory) 63 cwd=directory,
64 shell=(sys.platform=='win32'))
64 except OSError: 65 except OSError:
65 # command is apparently either not installed or not executable. 66 # command is apparently either not installed or not executable.
66 return None 67 return None
67 if not proc: 68 if not proc:
68 return None 69 return None
69 70
70 attrs = {} 71 attrs = {}
71 for line in proc.stdout: 72 for line in proc.stdout:
72 line = line.strip() 73 line = line.strip()
73 if not line: 74 if not line:
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if out_file: 149 if out_file:
149 WriteIfChanged(out_file, contents) 150 WriteIfChanged(out_file, contents)
150 else: 151 else:
151 sys.stdout.write(contents) 152 sys.stdout.write(contents)
152 153
153 return 0 154 return 0
154 155
155 156
156 if __name__ == '__main__': 157 if __name__ == '__main__':
157 sys.exit(main()) 158 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