Commit dba59533 authored by Jon Turney's avatar Jon Turney Committed by Hugo Beauzée-Luyssen

Add a simple script to update externals

Tweak the protobuf svn rev number requested slightly to r402, as r407
corresponds to a change in /wiki, which is not a path that svn-git considers by

Update to handle fetching lss from git not svn
Rename script to fetch-externals

Drop protobuf rev number tweak now dep comes from git
Sort deps to order check out of src/testing/ before src/testing/gtest/

Use print as a function
parent b1bc0320
......@@ -8,6 +8,13 @@ google-breakpad with added support for Cygwin/MinGW:
### Preparation
Run the fetch-externals script to fetch submodules in the DEPS file (e.g the gyp and gtest dependencies).
(The upsteam repository is meant to be checked out using Chromium's `depot_tools`, which does this for you)
Run autoreconf to generate ./configure
......@@ -25,9 +32,6 @@ See
will produce `dump_syms.exe`, `minidump_dump.exe`, `minidump_stackwalk.exe`, `libbreakpad.a`,
and for MinGW `libcrash_generation_client.a`, `libcrash_generation_server.a`, `crash_generation_app.exe`
Note that since git-svn ignores svn externals, this repository is missing the
gyp and gtest dependencies.
## Using
See [Getting started with breakpad](
#!/usr/bin/env python
# Read a depot_tools style DEPS file and recursively checkout the repos
# listed
from __future__ import print_function
import os
# required to make some DEPS files syntactically valid
def Var(var_name):
return '%s'
def system(cmd):
def checkout_deps(basepath):
depsfile = os.path.join(basepath, 'DEPS')
if not os.path.exists(depsfile):
print('Nothing to do for', depsfile)
print('Processing deps in', depsfile)
# evaluate contents of DEPS file
f = open(depsfile, 'r')
# process the path:url pairs in deps
for path in sorted(deps.keys()):
src = deps[path]
(url, rev) = src.split('@')
if path.startswith('src/'):
path = path[4:]
print('%s %s %s' % (url, path, rev))
if not os.path.exists(os.path.join(path, '.git')):
if url.find('svn') >= 0:
system('git svn clone -q %s %s -r %s' % (url, path, rev))
system('git clone -n %s %s' % (url, path))
system('cd %s; git reset --hard %s' % (path, rev))
if url.find('svn') >= 0:
system('cd %s; git svn fetch -q -r %s' % (path, rev))
system('cd %s; git reset --hard $(git svn find-rev r%s)' % (path, rev))
system('cd %s; git fetch %s' % (path, url))
system('cd %s; git reset --hard %s' % (path, rev))
# and recurse
checkout_deps(os.path.join(basepath, path))
print('Done processing of', depsfile)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment