[LLVMdev] GIT mirroring

Tobias Grosser grosser at fim.uni-passau.de
Mon Mar 21 14:27:44 PDT 2011


On 03/21/2011 04:47 PM, Bob Wilson wrote:
> I've been using Jakob's commands below, but it has stopped working for me.  This happened roughly around the time when Anton added the other branches, but I'm not sure if that was the cause or not.  The symptom is that the "git svn rebase -l" command does nothing except say that the master branch is already up to date, and "git svn dcommit" complains that files are out of date.  In both cases, "git svn rebase" (without "-l") solves the problem, but without using the GIT mirror, so it's slow.
>
> I've tried re-creating my git repos from scratch but that did not fix the problem.  Any ideas?

Yes, here the changes necessary:

>> $ git clone http://llvm.org/git/llvm.git
>> $ cd llvm
>> $ git config --add remote.origin.fetch '+refs/remotes/git-svn:refs/remotes/git-svn'
>> $ git fetch
Skip the last two lines line.

>> $ git svn init https://llvm.org/svn/llvm-project/llvm/trunk

Add here:
git config svn-remote.svn.fetch ':refs/remotes/origin/master'

>> $ git svn rebase -l
And here I personally just use a 'git svn fetch'

This is the complete sequence

$ git clone http://llvm.org/git/llvm.git
$ cd llvm
$ git svn init https://llvm.org/svn/llvm-project/llvm/trunk
$ git config svn-remote.svn.fetch ':refs/remotes/origin/master'
$ git svn fetch

LLVM trunk is now in origin/master and can be accessed e.g. by

$git log origin/master

It can be updated by using

$git remote update
$git fetch
$git pull


Cheers
Tobi




More information about the llvm-dev mailing list