summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-01-16 11:42:51 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-01-16 14:47:39 +0000
commita046b5465788fe3ab9b5f6373e5f967085998693 (patch)
tree507fc8fbf3ec383d400630c6422a36b48c1e3975
parent461979515ca30cd8e5acdec4cdb5ca3adeb6a9e7 (diff)
downloadimport-a046b5465788fe3ab9b5f6373e5f967085998693.tar.gz
Fix str_repo_lorry for svn reposbaserock/richardipsum/import-lorry-fix
Most svn repos use a standard layout, we assume svn repos we want to lorry are using a standard layout, so make str_repo_lorry add 'layout': 'standard' for svn repos
-rwxr-xr-xbaserockimport/exts/python.to_lorry11
1 files changed, 7 insertions, 4 deletions
diff --git a/baserockimport/exts/python.to_lorry b/baserockimport/exts/python.to_lorry
index db33e5f..8ee20eb 100755
--- a/baserockimport/exts/python.to_lorry
+++ b/baserockimport/exts/python.to_lorry
@@ -188,10 +188,13 @@ def str_repo_lorry(lorry_prefix, package_name, repo_type, url):
# TODO: this products field 'x-products-python'
# probably shouldn't be hardcoded here
- return json.dumps({name: {'type': repo_type,
- 'url': url,
- 'x-products-python': [package_name]}},
- indent=4, sort_keys=True)
+
+ lorry = {'type': repo_type, 'url': url, 'x-products-python': [package_name]}
+
+ if repo_type == 'svn':
+ lorry['layout'] = 'standard'
+
+ return json.dumps({name: lorry}, indent=4, sort_keys=True)
class PythonLorryExtension(ImportExtension):