It seems given the decent amount of discussions it's time to make
small announcement.
So, official git mirrors are available for some subset of LLVM
projects. They were used by some LLVM developers for couple of months
already and seem to be stable enough.
Right now there is a mirroring for LLVM itself and clang. More can be
added per requests. The mirrors are made via running of git-svn on
llvm.org inside post-commit hook, so they should be in theory as fresh
as possible. Also, one can recreate git-svn metadata and enable such
nice features like "git svn dcommit". The mirrors track only trunk
mostly due to not so git'ish way of doing branches / tags in LLVM
repository.
It's not yet decided whether we'll run e.g. gitweb for mirrors, most
probably - there won't be anything like this, viewvc should be enough
for almost all purposes.
PS: Patches to various sorts of documentation scattered here and there
are welcome
Anton Korobeynikov <anton@korobeynikov.info> writes:
So, official git mirrors are available for some subset of LLVM
projects. They were used by some LLVM developers for couple of months
already and seem to be stable enough.
Woo hoo!
as possible. Also, one can recreate git-svn metadata and enable such
nice features like "git svn dcommit". The mirrors track only trunk
Yee haw! Is there some documentation on how to set this up for LLVM?
This will quickly build the git-svn metadata by using the magical remotes/git-svn branch fetched from the origin.
To update I run:
$ git fetch
$ git svn rebase -l
And to commit:
$ git svn dcommit
$ git fetch
$ git svn rebase -l
I have sometimes seen git-svn refusing to dcommit, claiming that I have uncommitted files in my tree. I think this happens when I forget to resynchronize the metadata after committing. Anyway, the solution is to wipe away all of .git/svn and rebuild it with "git svn rebase -l"
I notice that .gitignore in the root has tools/clang. This makes it necessary to use ‘–force’ if using ‘git submodule’. I do not know if there are any drawbacks to this - if someone knows, it would be interesting to know what those drawbacks are.
One alternative would be for individuals who clone into tools/clone without using submodules to instead add tools/clang explicitly to .git/info/exclude.
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?
The trick with 'git config --add remote.origin.fetch' doesn't work anymore. I tried changing it to refer to the remote's master branch instead, but that has caused strange problems.
I now run 'git update-ref' every time I fetch from the mirror:
I've tried re-creating my git repos from scratch but that did not fix the problem. Any ideas?
The trick with 'git config --add remote.origin.fetch' doesn't work anymore. I tried changing it to refer to the remote's master branch instead, but that has caused strange problems.
I'm not a git-svn expert, but I suspect the real problem is that
git-svn automagically updates master from git-svn remote. Right now
we're exporting just master and thus stuff appears to form a cycle.
This is just a random thought though
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?
Now the default svn branch points to refs/remotes/origin/master instead of refs/remotes/git-svn and everything should work automatically.
Let me know if there are any problems with this approach.