SVN: How can I move one branch on top of another?

Due to some mismanagement of our SVN repository, we will eventually make a branch called Stable, containing a stable assembly of our code (the branch actually started with the tag of the latest release, not the trunk).

Basically, the body was “infected” with some changes made by our new programmer who did not really know what they were doing.

What I want to achieve is to make a stable branch of the chest, discarding all these changes since the branch happened, however I need to make sure that I keep the entire branch of the history backstory.

Does a branch contain the whole story before the branch? (in this case, I think I can just move the branch to become a trunk?)

All the textbooks I can find talk about merging. But I'm nervous about this, because if my understanding is correct, if there are changes in the trunk that do not occur in the conflict, I would end them in a stable assembly.

So the question is, what is my best option for this situation?

Thank you in advance for your entry!

+3
source share
4 answers

In your situation, I would recommend canceling the changes on your outside line using merge. You can specify the version numbers in reverse order for the merge command, using the trunk as the source and destination for the merge. For example, in the working directory for the trunk (note that you can use the repository URLs):

svn merge .@Y .@X .

, X, Y. , svn merge -dry-run, , - .

, , , - . , , , , , .

+2

, ... , .

svn log --help:

, . . -stop-on-copy, , .

+2

:

  • SVN, () . . ( "" )

  • , , , , . , , , , .

, .

+1

, . , :

  • .

svnadmin dump -rX:Y, , .

0

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


All Articles