1. Background

At my last company, I used SVN all the time, which was fine at first, but when the main project was split into micro services, it was disgusting to have so many local projects.

The directory structure on the SVN remote repository often corresponds to that on the local PC.

Of course, I can’t have a branch of my old company now. But I made a few folders from my impression to give you a feel:

1.1 Outer: Working directory

  • DevBranch houses the development branch, which is cut out by the project manager from ReleaseBranch. As a naive CRUD engineer at the time, this was the set of branches I encountered the most.
  • TestBranch houses the TestBranch, which is cut off from the development branch by the tester. The main concern is that developers “quietly” submit code during testing, so the test environment is all code on the branch that is released
  • ReleaseBranch stores the ReleaseBranch. After the product goes live, the development branch code that was last tested by testers is merged into the release branch.

1.2 DevBranch: Development branch

I tend to be responsible for several small features in multiple releases at the same time, and all branches are usually cut down. I’m usually afraid to delete local branches. Projects often cross over, and if there is an online problem, I need to:

  1. Re-obtain branches from the SVN remote repository;
  2. Re-open the project with the IDE;
  3. Reconfigure the Configuration… To get started.

Even if everything goes well, it usually takes 5 minutes to do it once. After the microservization of the project, many sub-projects were removed from the main project, and I would not dare to delete the local branch arbitrarily, say at least 15min, or at most 1h.

1.3 Microservice projects

Now that you think about it, you could have used the Maven project structure of multiple Modules, each as a microservice. But that’s just “catching fire,” because when you develop a new release, you still have to Check the new branch code at least once. But at the time, the microservices framework evolved slightly from the previous main services framework, so there was no multi-module structure for a Maven project.

If the development of a version V_1.0.3 requires at least User, Order, Inventory, and Gateway microservices to test a relatively complete business chain. So, I need to download all the codes of related systems from the SVN remote server. And the number of microservices we had was like 10+.

2. Roles and situations

As far as I know, my last company did version management like this:

  1. Architect: Affected somewhat, but not that much, because the architect only needs to branch when it is clear that the problem on the wire needs to be located

  2. Project Manager: Our project manager has been using SVN for over 8 years and is no longer involved in front-line coding. To get him to switch to Git quickly, he is unfamiliar. It is not particularly troublesome for SVN to cut and merge branches. Due to the learning cost and “switching risk” when switching Git, he does not have strong subjective intention to promote SVN upgrade to Git.

  3. Operation and Maintenance Engineer: A Jenkins environment that can be released automatically was deployed in SVN mode before. If it is used in Git mode, Shell and debugging environment need to be modified. I don’t know how much manpower is needed.

  4. CRUD Engineer: If you happen to be experiencing this, you can’t really change anything. For each release, you need to cut N branches, open the Project N times with the IDE, configure the Configuration N times, Close the Project, cut N branches again, and repeat.

3. If it is Git

If you’re using Git, congratulations, your WorkSpace folder has and only that

For each subproject, you only need to open it once with the IDE and configure it once… “And then you can enjoy coding.

This post is just a prequel, but I’m going to write a blog about how CRUD engineers can use Git to their advantage.

4. Suggest

If you’re an architect and project manager and owner who happens to be reading this, on behalf of the “desperate” CRUD engineers out there, I beg you, push for a full switch from SVN to Git.

Personally, this is one of the things you should do when upgrading from a single project to a microservice project.

I haven’t done much research or practice on SVN, so I’m just going to show you the previous solutions. If you have friends who use SVN better, feel free to criticize me in the comments.