From: Harvey Harrison <harvey.harrison@gmail.com>
To: git <git@vger.kernel.org>
Subject: [RFC] Mirroring svn
Date: Wed, 05 Dec 2007 22:22:33 -0800 [thread overview]
Message-ID: <1196922153.10408.101.camel@brick> (raw)
After the discussions lately regarding the gcc svn mirror. I'm coming
up with a recipe to set up your own git-svn mirror. Suggestions on the
following.
// Create directory and initialize git
mkdir gcc
cd gcc
git init
// add the remote site that currently mirrors gcc
// I have chosen the name gcc.gnu.org *1* as my local name to refer to
// this choose something else if you like
git remote add gcc.gnu.org git://git.infradead.org/gcc.git
// fetching someone else's remote branches is not a standard thing to do
// so we'll need to edit our .git/config file
// you should have a section that looks like:
[remote "gcc.gnu.org"]
url = git://git.infradead.org/gcc.git
fetch = +refs/heads/*:refs/remotes/gcc.gnu.org/*
// infradead's mirror puts the gcc svn branches in its own namespace
// refs/remotes/gcc.gnu.org/*
// change our fetch line accordingly
[remote "gcc.gnu.org"]
url = git://git.infradead.org/gcc.git
fetch = +refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*
// fetch the remote data from the mirror site
git remote update
// set up git-svn
// gcc has the standard trunk/branches/tags naming so use -s
// add a prefix so git-svn uses the metadata we just got from the
// mirror so we don't have to get everything from the svn server
// the --prefix must match whatever you chose in *1*, the trailing
// slash is important.
git svn init -s --prefix=gcc.gnu.org/ svn://gcc.gnu.org/svn/gcc
// your config should look like this now:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "gccmirror"]
url = git://git.infradead.org/gcc.git
fetch = +refs/heads/*:refs/remotes/gccmirror/*
[svn-remote "svn"]
url = svn://gcc.gnu.org/svn/gcc
fetch = trunk:refs/remotes/gcc.gnu.org/trunk
branches = branches/*:refs/remotes/gcc.gnu.org/*
tags = tags/*:refs/remotes/gcc.gnu.org/tags/*
// Try and get more revisions from the svn server
// this may take a little while the first time as git-svn builds
// metadata to allow bi-directional operation
git svn fetch
Happy Hacking
Harvey Harrison
next reply other threads:[~2007-12-06 6:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 6:22 Harvey Harrison [this message]
2007-12-06 6:43 ` [RFC] Mirroring svn Jeff King
2007-12-06 6:45 ` Harvey Harrison
2007-12-06 12:15 ` Johannes Schindelin
2007-12-06 12:18 ` Harvey Harrison
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=1196922153.10408.101.camel@brick \
--to=harvey.harrison@gmail.com \
--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).