From: "Peter Harris" <git@peter.is-a-geek.org>
To: "Oliver Charles" <oliver.g.charles@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: Best practices for maintaining a subversion mirror?
Date: Mon, 24 Nov 2008 10:37:35 -0500 [thread overview]
Message-ID: <eaa105840811240737t37578c8dp77adf5da27ac7e45@mail.gmail.com> (raw)
In-Reply-To: <5641883d0811240255i21aef729ld202bd5a3211dad9@mail.gmail.com>
On Mon, Nov 24, 2008 at 5:55 AM, Oliver Charles wrote:
> This seems to be working nicely as a readonly interface, but when I
> clone this repository (git clone git://foo/repo.git) - served via
> git-daemon - I can't seem to get svn rebase to work on it, which means
> I can't dcommit my changes back to Subversion.
>
> Am I doing things generally the right way, or am I doing it completely
> wrong? :-) Any tips appreciated!
First, make sure you aren't using the --no-metadata flag. git svn
rebase needs that metadata to rebuild its index.
Second, a simple "git clone" will not set up the svn remotes; you have
to do that by hand. This is what I do when I clone my svn mirror:
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 -Ttrunk svn://upstream/project
git config --add svn-remote.svn.fetch branches/foo:refs/remotes/foo
git config --add svn-remote.svn.fetch branches/bar:refs/remotes/bar
git reset --hard trunk
git svn rebase
Once you have it nailed down, you can put it into a script so all your
co-workers don't have to do that by hand too.
(Also, I quickly reset my cron job to run every five minutes; I found
an hour was way too long for my taste. YMMV, of course)
Peter Harris
prev parent reply other threads:[~2008-11-24 15:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 10:55 Best practices for maintaining a subversion mirror? Oliver Charles
2008-11-24 15:37 ` 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=eaa105840811240737t37578c8dp77adf5da27ac7e45@mail.gmail.com \
--to=git@peter.is-a-geek.org \
--cc=git@vger.kernel.org \
--cc=oliver.g.charles@googlemail.com \
/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).