summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-01-19 17:50:48 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-01-19 17:56:34 +0000
commit43b806953f0af31af1d0c9c8c5b53f43e140d4e0 (patch)
tree1cb473a57168190e1a4ded4de3f6acfc1c6b30d7 /lorry
parentf8decb803ea33e20a592e78fdc33a46a65eda620 (diff)
downloadlorry-43b806953f0af31af1d0c9c8c5b53f43e140d4e0.tar.gz
add better branch support to lorry
Adds a layout field to the lorry spec if it is omitted it is assumed that the url points to the trunk if layout is "standard" then url/trunk url/tags and url/branches point to the trunk, tags and branches if layout is a dict then the trunk, branches and tags fields are the corresponding paths Strange layouts can be handled by a wildcard * in the path So if there are branches in branches, but the Build/source is the only part wanted then "branches": "branches/*/Build/source" will only pull that
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry12
1 files changed, 11 insertions, 1 deletions
diff --git a/lorry b/lorry
index 91001e7..fd7abce 100755
--- a/lorry
+++ b/lorry
@@ -153,7 +153,17 @@ class Lorry(cliapp.Application):
if not os.path.exists(gitdir):
self.progress('.. doing initial clone')
os.mkdir(gitdir)
- self.run_program(['git', 'svn', 'clone', spec['url'], gitdir])
+ if "layout" not in spec:
+ self.run_program(['git', 'svn', 'clone', spec['url'], gitdir])
+ elif spec["layout"] == "standard":
+ self.run_program(['git', 'svn', 'clone', '--stdlayout',
+ spec['url'], gitdir])
+ else:
+ layout = spec["layout"]
+ self.run_program(['git', 'svn', 'clone', spec['url'],
+ '--tags', layout["tags"],
+ '--trunk', layout["trunk"],
+ '--branches', layout["branches"]],cwd=gitdir)
else:
self.progress('.. updating existing clone')
self.run_program(['git', 'svn', 'fetch'], cwd=gitdir)