On 29/06/2009, Matthias Pfafferodt <matthias.pfaffer...@mapfa.de> wrote:
> Am Thursday 18 June 2009 01:50:53 schrieb Madeline Book:
>> On 17/06/2009, Bernd Jendrissek <bernd.jendris...@gmail.com> wrote:
> [...]
>> > My experience (we did it with git-svn here at work) is that it's a bit
>> > of an impedance mismatch; svn's limitations impose limitations on how
>> > you use git (I don't know if git-svnimport is any better): merges seem
>> > to make SVN go "WTF?" and freak out.
>> >
>> > Although I've never tried, I guess you could use a separate branch for
>> > each patchset, if you take care with how you bring it back into SVN.
> I have a branch for each patchset. And it is a one-way data exchange svn ->
> git. The changes are submitted to gna as patches. Until now all is fine ...
>> Separate branches is what I use with git-svn, making a new branch
>> whenever I need to build on changes not yet in the main branch
>> (i.e. trunk, S2_1, etc.). As a contributor one has to submit patches
>> for inspection anyway, so when I do go to commit something, I just
>> checkout the destination branch, apply the previously posted patch
>> file, commit to git, then dcommit with git-svn. Unfortunately since
>> the underlying repo is still svn, we cannot use the powerful branch
>> merging features of git. :(
>> A while ago I wrote a mini intro to using git with freeciv svn:
>> https://mail.gna.org/public/freeciv-dev/2008-03/msg00048.html
> a size of 350MB? I have more than 3GB, most of it in the directory tags.
> It's
> not a problem but do I need this directory? I did a 'git svn clone
> svn://...'
> matth...@mattsys:/home/matthias/git> du -h --max-depth=2
> 2.5G    ./freeciv.git/tags
> 251M    ./freeciv.git/branches
> 242M    ./freeciv.git/trunk
> 208M    ./freeciv.git/.git
> 3.2G    ./freeciv.git
> 3.2G    .

Something is strange, since I have the full repository, with all my
local branches and all remote branches and tags in 341 MB as of
today (with "git-repack -a -d" and "make distclean" with 'trunk'
checked out).

My directory layout is different, I only have one directory (I call it
'git-svn'), in which there is a '.git' dir of 148M ("du -h -s ." inside)
and the currently checked out source within it (i.e. no separate 'tags',
'branches' and 'trunk' directories, e.g. 'autogen.sh' is just in 'git-svn').

Maybe despite what the documentation says, "git-svn clone" behaves
differently from running "git-svn init" and "git-svn fetch" separately.
Or maybe you have an old version of git or git-svn that behaves
that way.

$ git-svn --version
git-svn version (svn 1.5.1)

Anyway, the commands I used (in the directory you want to be
the root of the repository, like 'git-svn' above) are:

$ git svn init -t tags -b branches -T trunk --prefix=gna/
$ git svn fetch

(It will take a long time to fetch all the revisions, just do the command
again if it is interrupted by you or something else. Maybe you will need
a "while ! git svn fetch; sleep 5; done" or similar for your shell. ;))

(I'm also not sure if you should use 'svn+ssh://synt...@svn.gna...'
instead of just plain 'svn://svn.gna...', since I do not know if you will
have to re-fetch the whole damn thing if you were to get svn write
access some day...)

$ git-repack -a -d
$ git config branch.autosetupmerge true
$ git-checkout trunk gna/trunk
$ git-svn rebase

Now you should be all set.

I have no idea why your repository is so huge. It looks like it somehow
copied the entire svn repository, and then just added a .git directory
at its root. You do not need all of that, the laborious "svn fetch" should
have grabbed all of the necessary information and converted it into git

I hope I'm not crazy/stupid. ;)


Freeciv-dev mailing list

Reply via email to