unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: joakim@verona.se
Cc: Felipe Contreras Garza <felipe.contreras@gmail.com>, emacs-devel@gnu.org
Subject: Re: git-1.8.2 support pulling from and pushing to a bzr branch
Date: Wed, 1 May 2013 01:16:59 -0500	[thread overview]
Message-ID: <CAMP44s0NfXs+0B1WHQ3GFbuvP++UMPwLyOCCaq2HvN6BY=iVFw@mail.gmail.com> (raw)
In-Reply-To: <m34neo9v09.fsf@chopper.vpn.verona.se>

Hi,

On Tue, Apr 30, 2013 at 5:24 AM,  <joakim@verona.se> 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	other threads:[~2013-05-01  6:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 20:02 git-1.8.2 support pulling from and pushing to a bzr branch Jonas Bernoulli
2013-04-13 22:22 ` John Wiegley
2013-04-15 15:42   ` Γιώργος Κεραμίδας
2013-04-15 19:06     ` David Engster
2013-04-16 16:30       ` Giorgos Keramidas
2013-04-16 17:18   ` Julien Danjou
2013-04-18 18:53     ` joakim
2013-04-18 18:57       ` David Engster
2013-04-19  5:55         ` joakim
2013-04-20 19:01           ` joakim
2013-04-30 10:24             ` joakim
2013-05-01  6:16               ` Felipe Contreras [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP44s0NfXs+0B1WHQ3GFbuvP++UMPwLyOCCaq2HvN6BY=iVFw@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).