diff options
author | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 20:52:17 +0000 |
---|---|---|
committer | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 20:52:17 +0000 |
commit | 5d7c70be96f112c257a091469d5388191dd08b92 (patch) | |
tree | 579b7d48c9727cc3896cc93a422c4148618b68ec /build/util | |
parent | 48b51ba95f3dc41cba6431efdf43de9cd3b94a5e (diff) | |
download | chromium_src-5d7c70be96f112c257a091469d5388191dd08b92.zip chromium_src-5d7c70be96f112c257a091469d5388191dd08b92.tar.gz chromium_src-5d7c70be96f112c257a091469d5388191dd08b92.tar.bz2 |
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
Diffstat (limited to 'build/util')
-rwxr-xr-x | build/util/lastchange.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 4e5311b..8725640 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): |