emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git-1.8.2 support pulling from and pushing to a bzr branch


From: Felipe Contreras
Subject: Re: git-1.8.2 support pulling from and pushing to a bzr branch
Date: Wed, 1 May 2013 01:16:59 -0500

Hi,

On Tue, Apr 30, 2013 at 5:24 AM,  <address@hidden> wrote:
> I have now pushed a test commit to my xwidget branch using the latest
> version of Felipes git-remote-bzr.
>
> https://raw.github.com/felipec/git/fc/master/contrib/remote-helpers/git-remote-bzr
>
> Felipe was very helpful during this test. I think more of us should try
> it out now.

I just pushed a small fix so you can clone the whole repository.

These are my recommended instructions:

If you already have a bazaar branch, for example:

  % bzr branch bzr://bzr.savannah.gnu.org/emacs/trunk emacs-trunk

Then you do:

  % git init emacs-git
  % cd emacs-git
  % git remote add origin bzr::bzr://bzr.savannah.gnu.org/emacs
  % bzr init-repo --no-trees .git/bzr
  % bzr branch ../emacs-trunk .git/bzr/foobar # setup repo objects
  % rm -rf .git/bzr/foobar # remove cruft
  % git fetch origin

If something fails in the fetch phase, not everything is lost, you can
report the problem, and the information in the emacs-git repository
might be useful for debugging the issue. Then you can recover without
starting from scratch.

If you are feeling adventurous, you can of course try the whole thing in one go:

  % git clone bzr::bzr://bzr.savannah.gnu.org/emacs emacs-git

You will be able to keep track of all the branches, as if they were
native to git:

  % git branch --remote

  % git checkout -b xwidget origin/xwidget
  # hacking
  % git push

The only limitation is that you cannot use the idiom 'git push origin
cur-name:new-name', so the local branch should have the same name as
the remote branch.

Once you are happy with the setup, you should probably compress the git repo:

  % git gc --aggressive

Unfortunately, the emacs repo is too big, and too disperse (since it
came from a remote helper) for my poor machine to handle without
running out of memory, so, I have to do this:

  % git config gc.aggressiveWindow 50

Moreover, if you are only interested in a couple of branches, you can
specify them with:

  % git config remote-bzr.branches 'trunk, xwindow'

I also read a complaint about git always showing 'new branch', but
that's not a problem of this remote helper, it's in the git
infrastructure itself[1].

Good luck :)

[1] http://article.gmane.org/gmane.comp.version-control.git/220798

-- 
Felipe Contreras



reply via email to

[Prev in Thread] Current Thread [Next in Thread]