diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-01-23 14:57:36 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-01-23 14:57:36 +0000 |
commit | 18907dd8d8db707f098939f9bfb8a4c30c276c0b (patch) | |
tree | 40207ccb745ba56c9a1eee3674f6219b4d8c62f9 /lorry | |
parent | 4bd77ef3479ffdab1e95f9c8715aa323bcb96e36 (diff) | |
download | lorry-18907dd8d8db707f098939f9bfb8a4c30c276c0b.tar.gz |
Prefix the branches in remotes
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -160,21 +160,23 @@ class Lorry(cliapp.Application): self.progress('.. doing initial clone') os.mkdir(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', + self.run_program(['git', 'svn', 'clone', '--prefix=origin/', spec['url'], gitdir]) + elif spec["layout"] == "standard": + self.run_program(['git', 'svn', 'clone', '--prefix=origin/', + '--stdlayout', spec['url'], gitdir]) else: layout = spec["layout"] # git-svn will append /* to branches or tags that don't # already have one, this does not work with {a,b} globs self.run_program(['git', 'svn', 'clone', spec['url'], gitdir, - '--trunk', layout["trunk"]]) + '--trunk', layout["trunk"], + '--prefix=origin/']) self.run_program(['git', 'config', 'svn-remote.svn.branches', - layout["branches"] + ':refs/remotes/*'], + layout["branches"] + ':refs/remotes/origin/*'], cwd=gitdir) self.run_program(['git', 'config', 'svn-remote.svn.tags', - layout["tags"] + ':refs/remotes/tags/*'], + layout["tags"] + ':refs/remotes/origin/tags/*'], cwd=gitdir) self.run_program(['git', 'svn', 'fetch'], cwd=gitdir) else: |