diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2016-10-27 12:34:34 +0100 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2016-10-27 18:11:56 +0100 |
commit | 2f06f54c906f4ccfd5dd3d39420e786984dfbf14 (patch) | |
tree | 00778f7b3cd5402cf9ff12b12c3e264b0bdfedbe | |
parent | 03e707812e6ce8a66980a8744a2e60ecebfd176d (diff) | |
download | ybd-ps/wip-fix-243.tar.gz |
Proposed fix for recursive submodulesps/wip-fix-243
-rw-r--r-- | ybd/repos.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ybd/repos.py b/ybd/repos.py index c52adcc..6613b0a 100644 --- a/ybd/repos.py +++ b/ybd/repos.py @@ -178,16 +178,11 @@ def update_mirror(name, repo, gitdir): def checkout(dn): - _checkout(dn['name'], dn['repo'], dn['ref'], dn['checkout']) - - with app.chdir(dn['checkout']): - if os.path.exists('.gitmodules') or dn.get('submodules'): - checkout_submodules(dn) - + _checkout(dn['name'], dn['repo'], dn['ref'], dn['checkout'], dn) utils.set_mtime_recursively(dn['checkout']) -def _checkout(name, repo, ref, checkout): +def _checkout(name, repo, ref, checkout, dn=None): gitdir = os.path.join(app.config['gits'], get_repo_name(repo)) if not os.path.exists(gitdir): mirror(name, repo) @@ -212,6 +207,9 @@ def _checkout(name, repo, ref, checkout): app.log(name, 'Git checkout %s in %s' % (repo, checkout)) app.log(name, 'Upstream version %s' % get_version(checkout, ref)) + if dn and (os.path.exists('.gitmodules') or dn.get('submodules')): + checkout_submodules(dn) + def source_date_epoch(checkout): with app.chdir(checkout): |