felipec / git-remote-bzr

Transparent bidirectional bridge between Git and Bazaar for Git
GNU General Public License v2.0
75 stars 17 forks source link

Track multiple remote bzr branches in one git repository #12

Open baby-gnu opened 9 years ago

baby-gnu commented 9 years ago

Hello,

Following the @robru reply on #8, I can not track several remote bzr branches in my git repository.

I expected the git remote url to point to a remote bzr repository, under witch I can push my branches.

I expected something like git push perso feature/something to concatenate the git config remote.perso.url with the branch name to build the bzr URL.

It could be great to be able to track several remote branches within one git repository, and do things like:

Start by a clone:

$ git clone bzr::lp:something
Cloning into 'something'...
Checking connectivity... done.

Create a test branch

$ git checkout -b test master
$ echo "Test file" > test
$ git add test
$ git commit -m "Test commit"

Create my personal bzr remote repository and push my test branch

$ git remote add perso bzr::lp:~mylogin/something
$ git push -u perso test
<push the local test branch to remote bzr::lp:~mylogin/something/test>

Merge someone else feature:

$ git remote add someoneelse bzr::lp:~someoneelse/something
$ git fetch someoneelse
$ git merge someoneelse/feature/something
$ git push perso test

Regards.

felipec commented 8 years ago

What is the problem? Pushing to your test branch should work, but you need to create it first. Yeah, creating new branches is not implemented yet.

jlu5 commented 8 years ago

If I'm reading correctly, the problem is that you can't add a remote like bzr::lp:~mylogin/something and then fetch/push branches under that (e.g. git fetch bzr::lp:~mylogin/something testbranch fails). Only remotes like bzr::lp:~mylogin/something/some_branch are supported, which isn't as flexible.

baby-gnu commented 8 years ago

If I'm reading correctly, the problem is that you can't add a remote like bzr::lp:~mylogin/something and then fetch/push branches under that (e.g. git fetch bzr::lp:~mylogin/something testbranch fails).

Right, It could be interesting to get 1-1 mapping between bzr repositories and git remotes.

git-bzr-ng has a bzr subcommand but I prefer to see bzr repositories as git remotes.

Regards.

jlu5 commented 8 years ago

git-bzr-ng has a bzr subcommand but I prefer to see bzr repositories as git remotes.

I agree with this - it's so much nicer to use a familiar workflow for Git :)