I make launchpad automatically import code of my project from github. If I make changes at launchpad, like adding translations, is there a way to automatically export them to github? Or should I just switch to launchpad for code hosting?
3 Answers
You can use the "dpush" command from the bzr-git
plugin to push the changes on Launchpad back into Git.
E.g.:
$ bzr branch lp:~yourusername/yourproject/translations
$ cd translations
$ bzr dpush github:yourgithubusername/yourgithubrepo,branch=translations

- 2,405
- 14
- 27
-
May I edit to show the accepted way of specifying git repository. I find I have to use `bzr dpush git+ssh://git@github.com/user/repo` as http://doc.bazaar.canonical.com/migration/en/foreign/bzr-on-git-projects.html. – Fish Monitor Apr 11 '12 at 13:25
-
I get this error: `$ bzr dpush -v git+ssh://git@github.com/fossilet/4digits.git` `error: index-pack died of signal 11` `bzr: ERROR: unpack index-pack abnormal exit`. Maybe this is a bug of bzr-git: https://bugs.launchpad.net/bzr-git/+bug/818318 – Fish Monitor Apr 11 '12 at 13:30
-
Yeah, that indeed looks like that bug unfortunately. – jelmer Apr 11 '12 at 23:11
I don't see a two-way "roundtrip" mechanism in place to keep a bazaar and a git repo in sync.
That leaves you with bazaar export mechanism like fast-export
(described in "Convert bazaar to git").
But the process doesn't seem to be incremental, which could risk at least for the first export to create a different history (different SHA1), making your first export a git push -force
(not ideal)
So if your development environment of choice will be launchpad for the near future, switching to its dedicated VCS for now would be simpler.

- 1,262,500
- 529
- 4,410
- 5,250
-
I've been pulling my hair out trying to find a working "roundtrip" workflow. We have a bzr project on launchpad and I haven't yet found a sane way of interacting with the bzr branch through git and pushing the changes back upstream in a way that preserves ancestry relationships. – kynan Jul 31 '12 at 10:26
-
@kynan Yes, that would be a tough one to maintain. Any reason why a simple GitHub repo wouldn't be enough? – VonC Jul 31 '12 at 10:33
-
Turns out there has actually been some effort trying to make it work, though it's [not quite there yet](https://bugs.launchpad.net/bzr-git/+bug/544776). For us switching to GitHub is no option since we use the launchpad platform for all of its features (Ubuntu PPAs etc.) and many of the other devs are quite happy with bzr. – kynan Jul 31 '12 at 20:46
I tried to do the same and found bzr-git-ng plugin hosted on git: https://github.com/termie/git-bzr-ng
I didn't try syncing so far myself. Check the Extra Notes in the link above.

- 13
- 3