git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Harris <git@peter.is-a-geek.org>
To: Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk>
Cc: git@vger.kernel.org
Subject: Re: git svn and multiple cloned repositories
Date: Tue, 30 Jun 2009 09:44:28 -0400	[thread overview]
Message-ID: <eaa105840906300644s6bc9b619i24bd54537f4a67d4@mail.gmail.com> (raw)
In-Reply-To: <h2d043$4tm$1@ger.gmane.org>

On Tue, Jun 30, 2009 at 8:23 AM, Bruno Harbulot wrote:
> I participate in a few open-source projects for which I provide patches
> sometimes, but most of these projects use Subversion. git-svn is very
> convenient for trying out patches without interfering with the main branch
> (so as to submit them when they're ready). I presume many 'git svn' users do
> something like this too.
>
> However, I'd like to keep multiple copies of this repository (on a few
> machines, including one on a backup server) with the appropriate SVN
> metadata. I'd also like to be able to do 'git svn fetch' on only one of
> these cloned repositories (perhaps via crontab on the server) and to be able
> to push/pull this SVN metadata along with the commits between the cloned git
> repositories.
>
>
> Is there a recommended way to do this?
>
>
> I have found 3 ways of achieving this, but none of them seem ideal:
>
> 1. Copying the entire cloned repository as regular files and doing 'git svn
> fetch' regularly on each copy.

> 2. Transferring the SVN references by hand.

> 3. Using 'git clone --mirror' (only works with --bare option).

I use 4. Set up git remotes by hand to populate svn remotes directly.

  - On 'backup-server':
git svn clone -s svn://upstream/project
crontab -e  # run git svn fetch periodically

  - On 'machineX':
mkdir project
cd project
git init
git remote add origin git://mirror/project
git config --add remote.origin.fetch refs/remotes/*:refs/remotes/*
git fetch
git svn init -s svn://upstream/project
git reset --hard trunk
git svn rebase

Peter Harris

      reply	other threads:[~2009-06-30 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 12:23 git svn and multiple cloned repositories Bruno Harbulot
2009-06-30 13:44 ` Peter Harris [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

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

  git send-email \
    --in-reply-to=eaa105840906300644s6bc9b619i24bd54537f4a67d4@mail.gmail.com \
    --to=git@peter.is-a-geek.org \
    --cc=Bruno.Harbulot@manchester.ac.uk \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).