Svn branch (remote .svn folders)

I made a few mistakes when merging the trunk into a branch. At first I thought it was easier to check out a new working copy of the torso and add all the changes manually. Then I thought it was okay to remove the branched src folder and overwrite it with src from the trunk. Now it’s clear that the .svn folders are not the correct folders (since they belong to the trunk and not to the branch). So I decided to delete all the .svn folders, but now I don’t know how it is easiest to add to the branch or create a new branch with all my changes.

I believe that so far I have done everything wrong ...

I think that I’ll turn off my project, select the head revision of the branch, but then I somehow want to “redefine” the branch, more or less replacing the whole "src" panel (the standard location is maven).

Well, it is more or less that I can disconnect my changes from svn, which is essentially the current state ("src" is not a working copy, so I can also disable everything). In addition, I have a copy without the deleted .svn folders, but the .svn folders indicate to the torso that the whole problem.

respect,
Johannes

+1
source share
3 answers

The following steps that I use when I want to replace something from another branch with another branch or something else (under Windows):

1) check the latest copy of the source branch from the SVN server. Say this is the original copy of {A}

2) make a copy of your working copy. Say this is a modified copy of {B}

3) change the directory to the root of your {B} and delete the hidden .svn folders from all the folders and subfolders {B}

CD "{B}" FOR /F "tokens=*" %G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%G" 

4) copy {B} to {A}

5) commit {A}

+2
source

It looks like you are trying to discard all the changes made to the branch and replace them with the exact code that is on the trunk. In this case, why not just delete the entire branch and create a new one based on the current state of the trunk?

0
source

@Eee’s five-story plan should help you integrate your working copy changes into SVN (either Trunk or Branch).

If you want to update your branch with changes from Trunk, you can consider the “Bunny Hopping” method described here: http://designbygravity.wordpress.com/2009/10/19/what-mother-never-told-you-about- svn-branching-and-merging /

Basically, create a new branch from Trunk, merge your branch into a new branch and delete the old branch. If you have incomplete, changes to the working copy, you can copy them to a new working copy.

Please note that with the SVN 1.7 client it is much easier to delete .svn folders, since there is only 1 in the root of the working copy.

0
source

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


All Articles