If you want to handle the subversion repository of ROOT, here are some personal tips which may help. Hope you like it.
First of all, read some tutorial of git. Git is quite easy to learn. It may only take you one or two hours, then you can play with GIT. I recommend “Pro GIT”, the free online book – progit.org/book/
The ROOT repo ( root.cern.ch/svn/root/ ) is divided into several parts as below:
branches -- each release take one branch tree here tags -- Tags, as mentioned trunk -- The trunk directory vendors -- Third party codes
The simplest way to clone the repo using git is just like this:
git clone --stdlayout http://root.cern.ch/svn/root/
But the branch dev (dir: branches/dev/) is very special, which contains all temporary development and tests and is very big. What you may interest might be official releases, tags, and the trunk. So, you can ignore “dev” and “vendors”. Then, follow these steps:
- create a new directory and initialize it as a git repo
mkdir root-git cd root-git git init
- add the following lines to file .git/config
[svn-remote "svn"] url = http://root.cern.ch/svn/root ignore-paths = ^dev fetch = trunk:refs/remotes/trunk branches = branches/*:refs/remotes/* tags = tags/*:refs/remotes/tags/*
- then “git svn fetch”. After long waiting, you may get the local copy of the svn repo.
If you want to look at the dev branch, you’d better checkout each directory of “dev” as a new git branch. Your “svn-remote” section in .git/config can be changed as below:
[svn-remote "svn"] url = http://root.cern.ch/svn/root ignore-paths = ^dev fetch = trunk:refs/remotes/trunk branches = vendors/*:refs/remotes/vendors/* branches = branches/dev/*:refs/remotes/devel/* branches = branches/*:refs/remotes/* tags = tags/*:refs/remotes/tags/*
After “git svn fetch”, your local copy doesn’t contain tags. You can fix this using the attached script “git-fix-svn-tags.py”:
At last, play with the repo using git.
git-fix-svn-tags.py (1.11 KB)