remote-bzr: fix branch names
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 1 May 2013 01:10:02 +0000 (20:10 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 May 2013 05:06:47 +0000 (22:06 -0700)
When branches have '/' in their name (aka. sub-branches), bazaar seems
to choke while creating the new directory.

Also, git cannot have both 'foo' and 'foo/bar'.

So let's replace slashes with a plus sign.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-bzr
index 3b3306181e4e53dac75a66ec19d95f38b5f61b74..38cec07ed850048bbc4dee3de3e1350f7ee6e533 100755 (executable)
@@ -781,6 +781,7 @@ def get_repo(url, alias):
 
             name = repo.user_transport.relpath(branch.base)
             name = name if name != '' else 'master'
+            name = name.replace('/', '+')
 
             if not is_local:
                 peers[name] = branch