How to develop code on multiple computers using a CI server

I currently work a lot on my laptop while traveling to and from work for many days. But it's not as good as my main car at home. My problem is how to sync files. I use subversion, but also have a CI server that rebuilds every registration. There is a question here that concerns several machines and says to use a control source. But what if there is a CI server, this will lead to broken assemblies.

My first thought (which seems a little silly) would be to use two sets of source control, or at least two repositions for the same code. One for the CI server and one for transfer between machines. Not sure if you can even do this with SVN. Just looked at Mercurial after the Jeol blog . Not sure if this will work, since you still have a problem clicking on the central repo where the CI server will work.

I think the bottom line is how do you share code that is still buggy or not compiling, so you can switch cars without trading the assembly?

thanks

+4
source share
2 answers

You are actually on the right track with the idea of ​​a multiple repository, but Subversion does not support such a thing. Look at the use of the so-called DVCS (Distributed Version Management System) , such as Git or Mercurial , where you can have multiple repositories and easily share changes between them.

Then you can push the changes on the central server either from your desktop or from your laptop, and your source code management system will sort everything for you. Changes that are not yet completed can be made in another branch, so if you write a good code and some bad code on the train one morning, you can push the good code to the repository used by the CI server, and the bad code to your computer to develop on your desktop, and continue from the moment you left off.

+3
source

What about branches? Develop on a single branch and reintegrate only after you have finished development?

+1
source

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


All Articles