Using a switch instead of merging

At this moment, I am the only person working on a project in svn. To remain legal, I propose making changes to the branch, and then merging these changes in the trunk: so my branch and trunk are basically identical. I currently have two working copies: one for the branch and one for the trunk. I make changes to the working copy of the branch and commit them, then merge svn on the working copy of the trunk from the location of the branch and then commit these changes. Question: can I change my process so that I have only one working copy and switch between branch and trunk as follows: 1) switch to branch, make changes and commit. 2) switch to the highway, fix. 3) repeat.

+3
source share
3 answers

You can perform one more step.

1) switch to a branch, make changes and commit. 2) switch to the trunk, svn merge with the modified changes , commit. 3) repeat.

+5
source

As the previous answers show, you can stay with one working copy, switching back and forth. There is nothing technically wrong, the operation is semantically identical. However, I will remain with two working copies for the following reasons:

  • You still have to generate the changes after the switch, because the switch restores the (now committed) changes, as indicated in the first answer.
  • , , commit (svn: mergeinfo svn >= 1.5, ).
  • "" , / .
  • , , , , . - , .

( , ) , , , svn . , ?

+4

Yes, you can do it using svn switch.

If your working copy is currently in a branch and you have made your changes to the branch:

svn switch svn://server/path/to/repo/trunk

Then back to the branch:

svn switch svn://server/path/to/repo/branches/xxx
0
source

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


All Articles