📜 ⬆️ ⬇️

The correct cycle of working with versions of SVN

I think many curious people already know how to work properly with SVN.
But in many articles it is described rather superficially. I would like to slightly open the veil of the true versioning cycle, when developing a project, using the example of TortoiseSVN.
And so, let's go

Step 1. Create a branch.
To do this, you need to create a working copy of the version of trunk. Next, to create a branch, right-click on this copy and select TortoiseSVN -> Branch / tag in the context menu

In the dialog box that appears, enter the address of the branch (most importantly, do not create a directory, TSVN will do everything itself). Also, be sure to enter a short description of the branch (this is a very good tone). If you immediately want to start working with the branch, then check Switch working copy to branch / tag. Then your working copy will be a copy located on the site.

That's all. The branch is ready.
Step2. Return to the trunk
This step is for many very difficult for beginners. To make your changes appear in the trunk (and they should appear there), you need to perform an operation known as Merge.
So let's go.
Create another copy of the trunk apart from all your current working copy. This is done to ensure that your current working copy and its changes are not beaten.
On the working copy, in the context menu, find TortoiseSVN -> Merge:

Select Merge a range of revisions in the dialog box that appears. If this window does not appear, then it’s time to update TSVN.

Reintegrate a branch is also valid, that is, one thing but not all svn-servers are able to work with it (unfortunately, I haven’t been able to force it yet). Therefore, we will use the proven and working method everywhere.
In the new dialog box, you need to specify the path to your branch (URL to merge from) and the range of revisions.
Important! Do not specify only the HEAD revision - in this case these versions will merge from the first to the last revision. Practice has shown that nothing terrible will happen, but still better to be warned. In addition, if you specify the revision, it will be just faster.

In the next dialog box, options are already at your discretion (but first read the TSVN help). If you are not sure, then you can see the preliminary result using the Test Merge button. Clicking on Merge will merge all changes from the branch to your working copy of the trunk.
Now it remains to fix the conflicts, make sure everything is fine and commit commit your working version of the trunk to the server.
I highly advise you to indicate the revisions you have been merging in the message log. So you won’t get lost among the audits, and there will be a pointer for your team members.
The format is like this:
5000-5010 from ARTICLE1
5000-5010 are revisions, ARTICLE1 is a branch name.
Well that's all. When work on the branch is completed - this cycle begins again.
Some argue that after finishing work with brunch, it needs to be removed. Here, decide for yourself
Regards, blog.artsofte.ru
Good luck in the development!

')

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


All Articles