Git SVN and external

I want to start using git-svn for projects that use the central SVN repository. The problem is that we use windows and that the SVN project uses external resources to be able to reuse some code in two different projects. On a Unix system, we would use soft links, but since we were stuck in windows, we decided to use external tools as a workaround for limitations in Windows XP. If you have a better solution for this, it would be more than nice to hear that! The svn structure is as follows:

branch tag trunk -web --views ---External to commonFiles -admin --views ---External to commonFiles -commonFiles 

Is it possible that I can use git-svn, and if so, how can I do this?

Edit I have been looking for a good solution for a long time, but after writing this post I started to think how much this really relates to svn: externals. If I use git svn, I will get this

 branch tag trunk -web --views ---commonFiles (empty folder since externals didn't work) -admin --views ---commonFiles (empty folder since externals didn't work) -commonFiles 

Since I have a commonFiles folder in git, can I use the same technique as in svn in git? To link empty commonFiles folders to commonFiles supported with git?

+4
source share
4 answers

Now I came up with a solution that works great for me! I found out that in windows xp you can use something called jumpers. Transitions are something like mounting, with the difference that when you delete a folder, another folder will also be deleted. So what I ultimately did was to create transitions between my commonFiles and add ignore to the view folders.

 branch tag trunk -web --views ---commonFiles (junction to *, ignored in git) -admin --views ---commonFiles (junction to *, ignored in git) -commonFiles (*, controlled by git) 
-1
source

Yes, you must have git equivalent via the git submodule. The .git folder and the .gitmodules file will exist at the same level as the web server and administrator. The .git folder will exist in the external folder. You would like to ignore .svn folders in git and vice versa for svn.

Hope this helps!

+1
source

You can try detaching work files with multiple repositories, and then use the mr tool . To make it easier to work with multiple repositories.

0
source

Since unkownth suggests that connections are a good option.

When you look, the source tree will look like this:

 branch tag trunk -web --views -admin --views -commonFiles 

External elements omitted. To get a list of external ones , you can use the following command in an existing repository:

 svn propget svn:externals -R 

For relative external ones (those starting with ..) this is simple. You can use mklink to create a connection. In this example, run the following commands:

 mklink /J trunk\web\views\commonFiles trunk\commonFiles mklink /J trunk\admin\views\commonFiles trunk\commonFiles 

You can add these commands to git-hook to make sure they are created during validation.

0
source

All Articles