diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2016-03-04 12:32:17 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2016-03-04 13:52:53 +0000 |
commit | f94f0330eb1d4011868910a0f7234559e48ceff7 (patch) | |
tree | f12095e1b6e9b2ded6f0d19d0a3ac50cd53cfecf /scripts/organize-morphologies.py | |
parent | a6652bf61c4f4042e1d001ed9715b0857dbc792f (diff) | |
download | definitions-f94f0330eb1d4011868910a0f7234559e48ceff7.tar.gz |
Add small python library for common(ish) code in scripts/
Change-Id: I74ab24ecdcda1c358a2c187f89685bdd8f949c55
Diffstat (limited to 'scripts/organize-morphologies.py')
-rwxr-xr-x | scripts/organize-morphologies.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/scripts/organize-morphologies.py b/scripts/organize-morphologies.py index abc8c739..3072c8f8 100755 --- a/scripts/organize-morphologies.py +++ b/scripts/organize-morphologies.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (C) 2014 Codethink Limited +# Copyright (C) 2014-2016 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,17 +42,6 @@ which has been moved. ''' -# NOTE: The following reimplements part of morphlib's remote repo cache stuff -def parse_repo_alias(repo): - domain, path = repo.split(':') - if domain == 'baserock': - repo = 'ssh://git@git.baserock.org/baserock/%s' % path - elif domain == 'upstream': - repo = 'ssh://git@git.baserock.org/delta/%s' % path - else: - raise Exception("I don't know how to parse the repo-alias \"%s\"" % repo) - return repo - def make_request(path): server_url = 'http://git.baserock.org:8080/' url = urlparse.urljoin(server_url, '/1.0/%s' % path) @@ -206,7 +195,7 @@ def download_chunks(morph, loader): else: raise err ref = chunk['ref'] - repo = parse_repo_alias(chunk['repo']) + repo = scriptslib.parse_repo_alias(chunk['repo']) try: print "\nDownloading %s from %s into %s" %(name, repo, chunk['morph']) chunk_str = cat_file(repo, ref, name) |