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

Unified Diff: build/util/lastchange.py

Issue 126227: Fetch the SVN revision number correctly regardless of line endings... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/util/lastchange.py
===================================================================
--- build/util/lastchange.py (revision 18492)
+++ build/util/lastchange.py (working copy)
@@ -23,13 +23,14 @@
try:
p = subprocess.Popen(['svn', 'info'],
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- except OSError:
+ stderr=subprocess.PIPE,
+ shell=(sys.platform=='win32'))
+ except OSError, e:
Mark Mentovai 2009/06/16 21:21:28 You don't need the ,e here.
# 'svn' is apparently either not installed or not executable.
return None
revision = None
if p:
- svn_re = re.compile('^Revision:\s+(\S+)$', re.M)
+ svn_re = re.compile('^Revision:\s+(\d+)', re.M)
m = svn_re.search(p.stdout.read())
if m:
revision = m.group(1)
@@ -45,7 +46,8 @@
try:
p = subprocess.Popen(['git', 'log', '-1'],
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE,
+ shell=(sys.platform=='win32'))
except OSError:
# 'git' is apparently either not installed or not executable.
return None
« 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