From 403a0f9f5a2ee9d9b8f8d67aa4a1f07e601a3c9c Mon Sep 17 00:00:00 2001 From: "rsesek@chromium.org" Date: Fri, 29 Apr 2011 18:50:32 +0000 Subject: [PATCH] Don't eat newlines in CL descriptions when merging changes using drover. BUG=80589 TEST=Merge a CL using drover and when prompted to upload, check that the original CL description still has its linebreaks. Review URL: http://codereview.chromium.org/6893095 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83561 0039d316-1c4b-4281-b951-d872f2087c98 --- drover.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drover.py b/drover.py index 6ffef8594..f473955d2 100755 --- a/drover.py +++ b/drover.py @@ -118,10 +118,10 @@ def inCheckoutRoot(path): def getRevisionLog(url, revision): """Takes an svn url and gets the associated revision.""" svn_log = subprocess2.check_output( - ['svn', 'log', url, '-r', str(revision)]).splitlines() - # Don't include the header lines and the trailing "---..." line and eliminate - # any '\r's. - return ''.join([l.replace('\r','') for l in svn_log[3:-1]]) + ['svn', 'log', url, '-r', str(revision)], + universal_newlines=True).splitlines(True) + # Don't include the header lines and the trailing "---..." line. + return ''.join(svn_log[3:-1]) def getSVNVersionInfo(): """Extract version information from SVN"""