This is an old revision of the document!
Git is a revision control system, just like rcs, cvs and svn are.
Though the Crossfire repository is maintained by svn, it is possible to access this svn repo with git.
The svn package needs to be installed though, since it has bindings for PERL because git-svn is a perl script.
The bindings of SVN for Perl are available if SWIG is installed.
SVN needs to know where to find the swig binary at compilation time :
./configure --with-swig=/usr/rcs/bin/swig --with-ssl=/usr --with-apr=/usr/rcs --with-apr-util=/usr/rcs --with-neon=/usr/rcs --prefix=/usr/rcs/svn-1.6.23 --with-zlib=/lib --with-serf=/usr/rcs
When SWIG is available, then after make
it needs additionally make swig-pl
to compile the SVN perl modules and libraries.
make && make swig-pl && make install && make install-swig-pl
should then install the PERL bindings to something like
/usr/lib/perl5/site_perl/5.10.1/i686-linux-thread-multi-ld/SVN directory.
export PERLLIB='/usr/lib/perl5'
and export PERL5LIB='/usr/lib/perl5'
might be required though, so the perl modules are found.
Inside a new created directory then run these commands :
git svn clone -r 1 https://svn.code.sf.net/p/crossfire/code ;echo $?
Which should print to the terminal
Initialized empty Git repository in /mnt/sdb16/CROSSFIRE/client_svn/git_experiments/code/.git/
W: +empty_dir: trunk
r1 = a967a85ee09bcf27915ff5eb652a10a7dc0d4a89 (refs/remotes/git-svn)
Checked out HEAD:
https://svn.code.sf.net/p/crossfire/code r1
creating empty directory: trunk
0
And create a directory “code” with a hidden .git folder structure.
Now it needs to change into the new 'code' directory :
cd code
Now run git svn log :
git svn log ------------------------------------------------------------------------ r1 | (no author) | 1999-03-29 03:46:48 -0100 (Mon, 29 Mar 1999) | 2 lines New repository initialized by cvs2svn. ------------------------------------------------------------------------
Inside this code directory we start to “fetch” revision by revision :
git svn fetch -r 2 svn;echo $?
W: Ignoring error from SVN, path probably does not exist: (175002): RA layer request failed: REPORT request >on '/p/crossfire/code/!svn/rvr/2' failed
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
0hecked through r2
And then the files start to appear with revision 3 :
git svn fetch -r 3 svn;echo $? A trunk/arch/gods/supernatural/valriel.arc A trunk/arch/gods/supernatural/devourers.arc A trunk/arch/gods/supernatural/gorokh.arc A trunk/arch/gods/elemental/ruggilli.111 A trunk/arch/gods/elemental/ruggilli.211 A trunk/arch/gods/elemental/ruggilli.112 A trunk/arch/skills/singing.arc