This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Git and GCC


On Thu, 2007-12-13 at 14:40 +0000, Rafael Espindola wrote:
> > Yes, everything, by default you only get the more modern branches/tags,
> > but it's all in there.  If there is interest I can work with Bernardo
> > and get the rest publically exposed.
> 
> I decided to give it a try, but could not find the tuples branch. Is
> it too hard to make gimple-tuples-branch and lto visible?
> 

Here's a suggestion I sent to the git list, it's a bit loner than it
needs to be, but I think you'll understand a lot better what's going
on this way.:

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
// Note: git-svn has a patch in testing to use a _vastly_ more
// space efficient mapping from svn rev to git sha, I'd
// suggest you get it.
//
// This will rebuild the mapping for every svn branch
git svn fetch
// If you only care about one branch
// Check out a local copy of the tuples branch and switch
// to it
git checkout -b tuples remotes/gcc.gnu.org/tuples
// Update the git-svn metadata
git svn rebase

Hope that helps to get you started.

Harvey



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]