summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-01-23 14:57:36 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-01-23 14:57:36 +0000
commit18907dd8d8db707f098939f9bfb8a4c30c276c0b (patch)
tree40207ccb745ba56c9a1eee3674f6219b4d8c62f9 /lorry
parent4bd77ef3479ffdab1e95f9c8715aa323bcb96e36 (diff)
downloadlorry-18907dd8d8db707f098939f9bfb8a4c30c276c0b.tar.gz
Prefix the branches in remotes
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry14
1 files changed, 8 insertions, 6 deletions
diff --git a/lorry b/lorry
index a904eef..8bcae48 100755
--- a/lorry
+++ b/lorry
@@ -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: