ipc/pull-chromium.py

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 # This Source Code Form is subject to the terms of the Mozilla Public
     2 # License, v. 2.0. If a copy of the MPL was not distributed with this
     3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5 """
     6 Pull a specified revision of chromium from SVN.
     8 Usage: python pull-chromium.py <topsrcdir> <chromiumtree> <revision>
    10 You will have to set up a Chromium tree before running this step. See
    11 http://dev.chromium.org/developers/how-tos/get-the-code for details about
    12 doing this efficiently.
    13 """
    15 import sys, os
    16 from subprocess import check_call
    17 from shutil import rmtree
    19 topsrcdir, chromiumtree, rev = sys.argv[1:]
    21 if not os.path.exists(os.path.join(topsrcdir, 'client.py')):
    22     print >>sys.stderr, "Incorrect topsrcdir"
    23     sys.exit(1)
    25 if not os.path.exists(os.path.join(chromiumtree, 'src/DEPS')):
    26     print >>sys.stderr, "Incorrect chromium directory, missing DEPS"
    27     sys.exit(1)
    29 check_call(['gclient', 'sync', '--force', '--revision=src@%s' % rev], cwd=chromiumtree)
    31 chromiumsrc = os.path.join(topsrcdir, 'ipc/chromium/src')
    32 os.path.exists(chromiumsrc) and rmtree(chromiumsrc)
    34 def doexport(svnpath):
    35     localpath = os.path.join(chromiumsrc, svnpath)
    36     os.makedirs(os.path.dirname(localpath))
    37     check_call(['svn', 'export', '-r', 'BASE', os.path.join(chromiumtree, 'src', svnpath), localpath])
    39 doexport('base')
    40 doexport('chrome/common')
    41 doexport('build/build_config.h')
    42 doexport('testing/gtest/include')
    43 doexport('third_party/libevent')

mercurial