diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-01-19 17:50:48 +0000 |
---|---|---|
committer | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-01-19 17:56:34 +0000 |
commit | 43b806953f0af31af1d0c9c8c5b53f43e140d4e0 (patch) | |
tree | 1cb473a57168190e1a4ded4de3f6acfc1c6b30d7 /lorry | |
parent | f8decb803ea33e20a592e78fdc33a46a65eda620 (diff) | |
download | lorry-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-x | lorry | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) |