← Back to team overview

kicad-developers team mailing list archive

Git <-> bzr workflow

 

Hi,

On 15.02.2016 19:09, Bernhard Stegmaier wrote:

> sorry for hijacking…

> I guess you had your changes in a git branch?

Yes.

> What’s the easiest way to get the git branch to lp?

If you have git-remote-bzr installed, you can use a prefix of "bzr::" as
a git remote, e.g.

git clone bzr::lp:kicad

to create a local working copy that can be updated with "git pull". I've
set up my master branch to rebase on pull, so I can keep a stack of
patches current easily, and use "git format-patch" and "git send-email"
to send patches to the mailing list.

The way back to a bzr branch is a tiny bit annoying, because the bzr
bridge cannot create new branches (at least not in the version in Debian
stable), so:

1. have a bzr working tree ready somewhere. No need to know bzr, because
it will never track any changes
2. "bzr pull" to update the local bzr working tree
3. "bzr push lp:~user/foo" to create a stacking branch on LP
4. Go over to the git repo
5. "git remote add foo bzr::lp:~user/kicad/foo"
6. "git fetch foo" (takes a while)
7. "git checkout -b foo foo/master"
8. cherry-pick changes I want to submit
9. "git push foo foo:master"

So I use bzr to create the stacking branch with no changes, and then
rebase the changes onto that with git.

Unless a branch is part of a merge request or has another branch stacked
on top of it, you can always rebase it, by using "bzr push --overwrite"
and then rebasing the changes in git.

It might have become easier with a newer version of git-remote-bzr now,
rumour has it that it knows how to create stacking branches, but I
haven't tried it -- my normal workflow of submitting patches with
git-send-email works well enough for me.

   Simon

Attachment: signature.asc
Description: OpenPGP digital signature


References