@ -1,5 +1,5 @@
#!/usr/bin/python
#!/usr/bin/python
# Copyright (c) 20 09 The Chromium Authors. All rights reserved.
# Copyright (c) 20 1 0 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE file.
@ -150,14 +150,9 @@ def getRevisionLog(url, revision):
shell = True ,
shell = True ,
stdout = subprocess . PIPE ,
stdout = subprocess . PIPE ,
stderr = subprocess . PIPE ) . stdout . readlines ( )
stderr = subprocess . PIPE ) . stdout . readlines ( )
log = " "
# Don't include the header lines and the trailing "---..." line and eliminate
pos = 0
# any '\r's.
for line in svn_log :
return ' ' . join ( [ l . replace ( ' \r ' , ' ' ) for l in svn_log [ 3 : - 1 ] ] )
if ( pos > 2 ) :
log + = line . replace ( ' - ' , ' ' ) . replace ( ' \r ' , ' ' )
else :
pos = pos + 1
return log
def getSVNVersionInfo ( ) :
def getSVNVersionInfo ( ) :
""" Extract version information from SVN """
""" Extract version information from SVN """
@ -528,7 +523,7 @@ def main(options, args):
out . write ( action + " " + str ( revision ) + " - " )
out . write ( action + " " + str ( revision ) + " - " )
out . write ( getRevisionLog ( url , revision ) )
out . write ( getRevisionLog ( url , revision ) )
if ( author ) :
if ( author ) :
out . write ( " TBR= " + author )
out . write ( " \n TBR= " + author )
out . close ( )
out . close ( )
change_cmd = ' change ' + str ( revision ) + " " + filename
change_cmd = ' change ' + str ( revision ) + " " + filename