Is it possible to create a workspace that is a git workspace and an svn workspace?

I checked now the local working copy of the code base, which is in the svn repository. This is a big Java project in which I use Eclipse for development. Eclipse, of course, builds everything on the fly, in its own way, with all binaries ending in [project root] / bin . This is great for me, for development, but when the assembly works on the assembly server, it looks pretty much (maven build, binaries in a different directory structure, etc.).

Sometimes I need to recreate the build server environment on my local development system to debug the build or whatever you have, so I usually load a completely new working copy into a new workspace and run the build there (prevents cluttering my development workspace with all build artifacts and contamination of the working copy). Of course, sometimes I’m interested in starting a complete build of the code, which I don’t want to test yet, so I will manually copy the "development" workspace to the "build" workspace. Besides the fact that you copy a lot of files a lot of time that I really don’t need (just overlaying the new one on top of the old one), it also twists my svn metadata, which means that I can’t check the changes in this "assembly" of the workspace " and I often have to overload the code to return it to a known state.

So, I think that I am making my working copy of svn a local git repository, and then I will exit the development code from the working copy of svn working / git to the local build workspace. Then I can build, revert my changes, get all the benefits of a working copy, version-controlled, in the build workspace. Then, if I need to make changes to the assembly, drop them back to the git wizard (which is also an svn work operation), and then check them in the main svn repository.

|-------------| |main svn repo| <------- |---------------------| |-------------| |svn working copy | <------- |--------------------| | (svn dev workspace/ | | non-svn-versioned | | git master) | | build workspace | |---------------------| | (git working copy) | |--------------------| 

Just switching everything to git will obviously be better, but a big company, too many people using svn, is too expensive to change everything, etc. At the moment, we are stuck in svn as the main repo.

By the way, I know that there is a maven plugin for Eclipse and that’s all, I’m mostly interested in finding out if there is a way to maintain a workspace that is a working copy of git and a working copy of svn. In fact, any working version control system will probably work (maybe hg?). Advice? How does everyone else cope with this situation when you need to manage the build process of the "development" and the "build process"?

+4
source share
1 answer

The idea of ​​cloning a git repo repository (a copy of svn repo) to another git repository might work.
With Git1.7.0, you can associate this approach with sparse validation if you don't want to validate everything starting from your first git repository.

+1
source

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


All Articles