diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-27 11:17:29 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-27 11:17:29 +0000 |
commit | f3293ecbda184248ea370aa8a419968cb005ba03 (patch) | |
tree | f2e30b0e95e3ff635fd82acf2d43514b21734b93 /morphlib | |
parent | 6ebd296188aaceaa018b971b79c48e590d3682b0 (diff) | |
parent | 413c116843fc9457a64616e4841ce73f7a061cbb (diff) | |
download | morph-f3293ecbda184248ea370aa8a419968cb005ba03.tar.gz |
Merge branch 'baserock/richardmaw/S8646/edit-odd-submodules' of git://git.baserock.org/baserock/baserock/morph
Reviewed-by: Lars Wirzenius
Reviewed-by: Jonathan Maw
Note: This branch was based off the `baserock/richardmaw/S8646/fix-tests`
branch, so that has also been merged with this commit.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/git.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/morphlib/git.py b/morphlib/git.py index ff5e5c7d..4ff08a72 100644 --- a/morphlib/git.py +++ b/morphlib/git.py @@ -149,12 +149,12 @@ def update_submodules(app, repo_dir): # pragma: no cover resolver = morphlib.repoaliasresolver.RepoAliasResolver( app.settings['repo-alias']) app.runcmd(['git', 'submodule', 'init'], cwd=repo_dir) - urls = app.runcmd( - ['git', 'config', '--get-regexp', r'submodule.\w+.url'], - cwd=repo_dir) - for line in urls.splitlines(): - setting, url = line.split(' ') - app.runcmd(['git', 'config', setting, resolver.pull_url(url)], + submodules = Submodules(app, repo_dir, 'HEAD') + submodules.load() + for submodule in submodules: + app.runcmd(['git', 'config', + 'submodule.%s.url' % submodule.name, + resolver.pull_url(submodule.url)], cwd=repo_dir) app.runcmd(['git', 'submodule', 'update'], cwd=repo_dir) |