Using git svn with some inconvenient permissions

Due to some funky rights on the client side that we cannot change, we have a project whose hierarchy looks something like this:

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

  • project_name / branches : branch1 /, branch2 /

    • (where branch 1 and branch2 contain foo, bar and baz.)

The fact is that I do not have permission to access the trunk , so I can not just make a project / trunk clone. I have permission to access the branches .

I am currently checking each subdirectory through git svn clone, so that each one has its own git repository. I use a script to update / commit them all, but what I would prefer to do is check them all within the same repo and be able to commit the changes with a single git svn dcommit call. Is it possible?

I mentioned the branch hierarchy because, if possible, I would also like to track branches as I could if permissions were more reasonable.

I tried to rearrange many options that seemed useful, but I did not find what gives me exactly what I want. I feel that the solution may have something to do with --no-minim-url, but I'm not even sure about it, since it did not help me when I tried.

+4
source share
1 answer

After a quick check, it seems that the standard method works flawlessly.

git svn clone --branches /projectname/branches SVN_URL 

Then you can do dcommits on these branches normally.

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

Update2: it seems that --no-minimize-url allows you to do such an import with limited read permissions.

+2
source

Source: https://habr.com/ru/post/1312053/


All Articles