views:

56

answers:

1

Due to some funky permissions on our client's side that we can't change, we have a project whose hierarchy looks something like:

  • projectname/trunk: foo/, bar/, baz/

  • projectname/branches: branch1/, branch2/

    • (where branch1 and branch2 each contain foo, bar, and baz.)

The thing is, I have no permission to access trunk, so I can't just do a clone of project/trunk. I do have permission to access branches.

What I am currently doing is checking out each subdirectory individually via git svn clone, so that each one has their own git repo. I use a script to update/commit them all, but what I would prefer to do is to check them all out under a single repo, and be able to commit changes with a single call to git svn dcommit. Is this possible?

I mentioned the branches hierarchy because if possible, I'd also like to be able to track the branches the way I could if the permissions were more sane.

I've tried permuting a lot of options that sounded useful, but I haven't found one that gives me exactly what I want. I sense that the solution may have something to do with --no-minimize-url, but I'm not even sure about that, as it didn't help me when I tried it.

+1  A: 

After a quick check it seems a standard way works flawlessly.

git svn clone --branches /projectname/branches SVN_URL

You can then do dcommits on these branches normally.

Update: it does not work without permissions to read (list) folder /projectname and / unfortunately.

silk
Sorry, I'm not sure what you mean. SVN_URL would point to trunk, correct? I don't have permission to access trunk--merely permission for its subdirectories, so git svn clone SVN_URL wouldn't work, while git svn clone SVN_URL/subdirectory1 would mean I'd have to clone each subdirectory individually, each with its own repo.
Migs
No, svn url is the url to the repository. Without the trunk, projectname, etc. The base url. If you do 'svn info' in any working copy from that repository it is shown in the third line as the 'repository root'.
silk
Ah, ok. You do not need permissions to the trunk. But it seems git-svn needs permissions to read the directory list in /projectname/.You would have to ask for that permissions, although it is irritating to set up considering how svnauthz works :(
silk
Thank you very much for the help.Edit: Wait, I cannot get permissions, unfortunately, but I do have a list of the subdirectories that can be found inside trunk. Does this help?
Migs