author Mike Hommey <mh+mozilla@glandium.org>
Mon, 21 Jan 2019 17:32:11 +0000
changeset 454764 39d0c50a2209e0f0c982b1d121765c9dc950e161
parent 427035 2de2efc2dec7720abb6c5213f70f22a51bb842c2
permissions -rw-r--r--
Bug 1521284 - Don't hardcode config.log path in old-configure. r=nalexander Because old-configure is only refreshed when, essentially, old-configure.in changes, hardcoded (absolute) paths don't necessarily match the build environment of the current build. So instead, use an environment variable that we pass from python configure when invoking old-configure. Also do dummy changes to old-configure.in so that old-configure is refreshed at least once to get the environment-based value. Differential Revision: https://phabricator.services.mozilla.com/D17077

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Pull a specified revision of chromium from SVN.

Usage: python pull-chromium.py <topsrcdir> <chromiumtree> <revision>

You will have to set up a Chromium tree before running this step. See
http://dev.chromium.org/developers/how-tos/get-the-code for details about
doing this efficiently.

import sys
import os
from subprocess import check_call
from shutil import rmtree

topsrcdir, chromiumtree, rev = sys.argv[1:]

if not os.path.exists(os.path.join(topsrcdir, 'client.py')):
    print >>sys.stderr, "Incorrect topsrcdir"

if not os.path.exists(os.path.join(chromiumtree, 'src/DEPS')):
    print >>sys.stderr, "Incorrect chromium directory, missing DEPS"

check_call(['gclient', 'sync', '--force', '--revision=src@%s' % rev], cwd=chromiumtree)

chromiumsrc = os.path.join(topsrcdir, 'ipc/chromium/src')
os.path.exists(chromiumsrc) and rmtree(chromiumsrc)

def doexport(svnpath):
    localpath = os.path.join(chromiumsrc, svnpath)
    check_call(['svn', 'export', '-r', 'BASE', os.path.join(chromiumtree, 'src', svnpath),