[Lazarus] Instructions for git-svn link for Lazarus repository

Juha Manninen juha.manninen at phnet.fi
Wed Mar 10 08:53:59 CET 2010


> Note that initial clone sequentially requests all revisions from svn
> reopsitory, so it may take some time and generate some stress on the svn
> server. (One may choose to clone only the recent revisions, but this defeats
> one of the important advantages of Git -- ability to view history in a
> reasonable time).

There can be other motives to use git than the history. Like managing the 
local commits (join, split, reorder) before making them public.
The server load would be relevant if this was done by hundreds of people but 
it won't happen.
I didn't (and my instructions don't) clone the whole history.


> Following fetches, however, are equivalent  to the usual "svn update"
> in terms of server load.
> This is primarily why official git mirror would be useful -- people could
> clone the mirror from github and then reconfigure it to fetch/dcommit to
> svn repository.

I agree. I tried to configure Graeme's mirror to use Lazarus SVN directly but 
failed. I am not a git expert, I just learned the basics myself.
If you have a working configuration, please copy it here (or to the wiki 
page).

I copy here a section from git-svn --help. That should make a mirror readily 
configured for the SVN server but I haven't tried it:

---
The initial git svn clone can be quite time-consuming (especially for large 
Subversion repositories). If multiple people (or one person with multiple 
machines) want to use git svn to interact with the same Subversion repository, 
you can do the initial git svn clone to a repository on a server and have each 
person clone that repository with git clone:
# Do the initial import on a server
        ssh server "cd /pub && git svn clone http://svn.example.com/project
# Clone locally - make sure the refs/remotes/ space matches the server
        mkdir project
        cd project
        git init
        git remote add origin server:/pub/project
        git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
        git fetch
# Create a local branch from one of the branches just fetched
        git checkout -b master FETCH_HEAD
# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
        git svn init http://svn.example.com/project
# Pull the latest changes from Subversion
        git svn rebase
---
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100310/69e6ceba/attachment-0004.html>


More information about the Lazarus mailing list