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

Unified Diff: runtime/tools/make_version.py

Issue 11340005: Remove most debug output from runtime/tools/make_version.py (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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: runtime/tools/make_version.py
===================================================================
--- runtime/tools/make_version.py (revision 14171)
+++ runtime/tools/make_version.py (working copy)
@@ -20,37 +20,29 @@
def getVersionPart(version_file, part):
command = ['awk', '$1 == "%s" {print $2}' % (part), version_file]
- debugLog("Getting version part: %s Running command %s" % (part, command))
proc = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
result = proc.communicate()[0].split('\n')[0]
- debugLog("Got result: %s" % result)
return result
def getRevision():
- debugLog("Getting revision")
is_svn = True
if os.path.exists('.svn'):
- debugLog("Using svn to get revision")
cmd = ['svn', 'info']
else:
git_proc = subprocess.Popen(
['git', 'branch', '-r'],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if 'git-svn' in git_proc.communicate()[0]:
- debugLog("Using git svn to get revision")
cmd = ['git', 'svn', 'info']
else:
# Cannot get revision because we are not in svn or
# git svn checkout.
- debugLog("Could not get revision: not an svn or git-svn checkout?")
return ''
- debugLog("Running command to get revision: %s" % cmd)
proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
revision = proc.communicate()[0].split('\n')[4].split(' ')[1]
- debugLog("Got revision: %s" % revision)
return revision
def makeVersionString(version_file):
@@ -73,14 +65,11 @@
return version_string
def makeFile(output_file, input_file, version_file):
- debugLog("Making version file")
version_cc_text = open(input_file).read()
version_string = makeVersionString(version_file)
- debugLog("Writing version to version_cc file: %s" % version_string)
version_cc_text = version_cc_text.replace("{{VERSION_STR}}",
version_string)
version_time = time.ctime(time.time())
- debugLog("Writing time to version_cc file: %s" % version_time)
version_cc_text = version_cc_text.replace("{{BUILD_TIME}}",
version_time)
open(output_file, 'w').write(version_cc_text)
@@ -126,7 +115,5 @@
return -1
if __name__ == '__main__':
- debugLog('starting make_version.py')
exit_code = main(sys.argv)
- debugLog('exiting make_version.py (exit code: %s)' % exit_code)
sys.exit(exit_code)
« 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