How to handle decisions / versions in subversion

We use ankhsvn to test our .net code, however I have two problems with our installation that I want to solve.

1 \ I thought that the key reason to use a tool like svn is that you can roll back to an earlier version of your code base. If developers just check the code, then how can you get version 1.1 (for example, the current build) from subversion?

2 \ In VS, you have a concept of solutions, many solutions can use the same project. How can I make sure that the developer checks the solution, they get the corresponding versions of the projects belonging to this solution?

+4
source share
3 answers
  • You need to know about tags. The idea would be that when you reach the point at which the release time is X, you will create a read-only / tag / release_X file in your Subversion repository. You continue to work in / trunk or a / branch; if you need / tag / release _X, you just check it out.
  • I do not know what the concept of "decision" is. If you mean that you have a collaborative project that turns into a JAR or WAR or DLL or assembly used by several projects, you can check the artifact, and other projects just check it, like any other third-party JAR.

I would recommend reading the SVN Red Bean book .

+5
source

To create a "tag" (new version of the application) in ankhsvn:

  • In Solution Explorer, right-click the item and select Subversion> Branch Solution. Return an item to a specific revision.
  • In the Create Branch / Tag window, select the source for your branch or tag.
    • HEAD or latest revision in the repository
    • Specific old version in the repository
    • Your local working copy
  • To automatically switch the working copy to a new branch, select Switch To Branch after creation.

    Note. If your working copy has modifications, these changes will be merged into a working copy of the branch when it is switched.

  • Enter a log message explaining why you are creating a branch or tag.
  • Click OK.

This is a rather crappy solution, too tame for my taste (it doesn’t “know” the location of the original project, I don’t want this process to be burdensome), what I really want is one button to do this work, so I’ll continue the investigation.

+1
source

For question 2:

You can use the svn:externals property to associate the corresponding version of the project with the solution if the project code is stored in different directories in the svn repository than the solutions. If you set the externals property on the solution trunk to point to a tag, the version of the project that has been tagged will be checked using the solution.

I don't know if the AnkhSVN interface provides a way to add the externals property, since I usually use the TortoiseSVN repository browser for this task.

I will make a recommendation to read the Red Bean book .

+1
source

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


All Articles