|
From: <js...@us...> - 2012-06-28 08:44:50
|
Revision: 2541
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2541&view=rev
Author: jsu1
Date: 2012-06-28 08:44:41 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
Fix the end of line to all use ?\226?\128?\152\r\n?\226?\128?\153 in build report.
Reviewed-by: Zeng, Yurui <yur...@in...>
Reviewed-by: Liu Yingke <yin...@in...>
Signed-off-by: Su jikui <jik...@in...>
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2012-06-25 02:32:08 UTC (rev 2540)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2012-06-28 08:44:41 UTC (rev 2541)
@@ -4,7 +4,7 @@
# This module contains the functionality to generate build report after
# build all target completes successfully.
#
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -72,6 +72,9 @@
## Tags for MaxLength of line in report
gLineMaxLength = 120
+## Tags for end of line in report
+gEndOfLine = "\r\n"
+
## Tags for section start, end and separator
gSectionStart = ">" + "=" * (gLineMaxLength-2) + "<"
gSectionEnd = "<" + "=" * (gLineMaxLength-2) + ">" + "\n"
@@ -128,7 +131,7 @@
def FileWrite(File, String, Wrapper=False):
if Wrapper:
String = textwrap.fill(String, 120)
- File.write(String + "\r\n")
+ File.write(String + gEndOfLine)
##
# Find all the header file that the module source directly includes.
@@ -185,6 +188,7 @@
# @param MaxLength The Max Length of the line
#
def FileLinesSplit(Content=None, MaxLength=None):
+ Content = Content.replace(gEndOfLine, TAB_LINE_BREAK)
ContentList = Content.split(TAB_LINE_BREAK)
NewContent = ''
NewContentList = []
@@ -202,7 +206,7 @@
if Line:
NewContentList.append(Line)
for NewLine in NewContentList:
- NewContent += NewLine + TAB_LINE_BREAK
+ NewContent += NewLine + gEndOfLine
return NewContent
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|