tags:

views:

471

answers:

2

Hi,

I have started to use git-svn for some of my work to be able to do local commits. This works great for projects that use standard svn layout. Recently I started working on a Java project that is split into multiple connected modules (20-25), and each module have its own root folder in the same svn repo with its own trunk/branches/tags.

svnrepo/    
  module-1
    trunk
    branches
    tags
  module-N
    trunk
    branches
    tags

I have cloned each and every module with git svn clone -s /path/to/svnrepo/module[1-N]. The "problem" is that when I want to do git svn rebase on all modules i have to do it N times.

I have tried to do git svn clone /path/to/svnrepo/ do avoid doing the rebase operation N times, but that leaves me with a directory layout that is the same as in the svn repo.

Is there a way that I can track all the trunks of all modules in one git repo? So that I get a directory layout like this within my git repository:

module-1
module-2
module-N
+1  A: 

Unfortunately, no, there is no way to do this. One problem is that there is nothing preventing two or more modules from having a branch with the same name. Then, in git-svn, when you give it the branch name, how would it know which module you are talking about?

This problem really stems from the fact that in Subversion branches are not a first-class concept, whereas in git they are. git-svn is able to use more-or-less a kludge to work around this fact, but the kludge breaks down if the repo has a "non-standard" layout (such as the one you are working with).

My suggestion: write a script to git-svn rebase them all.

Dan Moulding
A: 

fyi: his layout is standard.

me

related questions