From 5d7c70be96f112c257a091469d5388191dd08b92 Mon Sep 17 00:00:00 2001 From: "dilmah@chromium.org" Date: Thu, 3 Mar 2011 20:52:17 +0000 Subject: [PATCH] Fix webkit build failure reported by evan@ When fetching svn URL via 'git svn info --url' command git-svn.perl script may print its progress log to stdout instead of stderr: as a result we end up using all this junk as svn repository URL. Fix it by filtering output. BUG=None TEST=None Review URL: http://codereview.chromium.org/6603022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76803 0039d316-1c4b-4281-b951-d872f2087c98 --- build/util/lastchange.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 4e5311b11dbbb2..872564065c6456 100755 --- a/build/util/lastchange.py +++ b/build/util/lastchange.py @@ -129,14 +129,15 @@ def FetchGitSVNURL(directory): Returns: SVN URL. """ - if not IsGitSVN(directory): - return None - proc = RunGitCommand(directory, ['svn', 'info', '--url']) - if proc: - output = proc.communicate()[0].strip() - if proc.returncode == 0: - return output - return None + if IsGitSVN(directory): + proc = RunGitCommand(directory, ['svn', 'info', '--url']) + if proc: + output = proc.communicate()[0].strip() + if proc.returncode == 0: + match = re.search(r'^\w+://.*$', output, re.M) + if match: + return match.group(0) + return '' def LookupGitSVNRevision(directory, depth):