How to remove 1 version of a folder in Subversion

I have several projects in my repository, each project has its own folder. Is it possible to delete the latest revision of one of the projects without changing anything else?

Example: project. The latest version was done with the creation of rev. 50. Work continues on other projects, now in the repository is rev. 60.

Now user A comes back and asks to remove the changes of the latest version, because they do not work for him. He wants to return to the previous version, and all further changes must be made from there.

At this point, I would like to rev. 50 disappear, so that Project A can continue as if rev. 50 never happened.

The only way I see is to create a branch and from now on work on this branch. But it just creates a lot of branches over time, and the history of the project is cluttered.

What is a good solution for this scenario?

+3
source share
5 answers
  • Make an update to ensure that your working copy is updated. Make sure the working copy is clean, with no pending changes.
  • Right click on the root folder of your working copy of the project and "show log"
  • Select (ctrl / shift to select multiple) the changes you want to undo
  • Right-click the selected changes and "discard the changes with these changes"
  • , . .

, < , : " " . BASE, . , subversion , .

, , " ".

+5

, . , subversion. .

, , 49, rev 61.

, , .

SVN: http://svnbook.red-bean.com/en/1.0/svn-book.html#svn-ch-4-sect-4.2

"svn merge -r 60:50 xxx://path"

+9

, , 50 ( "update to revision" ), , - , . , .

, . .

+2

51:60

svn merge -r 50:49 A/trunk/
#the most painful experience in your life
svn commit -m "reverting to rev49"

, .

51:60,

svn diff -r 50:49 A/trunk/
#review changes from the diff and apply them. or patch.
svn commit -m "reverting to rev49"
+1

, , , , .

, A, . , A , 50. , ( , ):

svn del full://url/to/project/A
svn cp full://url/to/project/A@49 full://url/to/project/A

This basically β€œdeletes” the current HEAD of project A from the repository (it is still in the history), and then copies an older copy of the project (from to the problem commit).

This procedure is so transparent that if someone with check A (starting from version 50 or later) performs svn update, they will be updated to the latest version without any problems. There is no merger to fight anything.

+1
source

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


All Articles