Question

Is there a way in SVN to copy only some branches of a repository to a new repository while saving history. I created a branch and later deleted that. Now I am getting an error about chunked stream ending expectantly. I just want to get back to the point I was at before the branch was initially created. If there is a better way of achieving my goal, can you please suggest it as I am a little new to SVN.

Thank you in advance

Was it helpful?

Solution

You can probably just backup your current repository and restore it as a new one, then delete the branches you DO NOT want.

OTHER TIPS

I just want to get back to the point I was at before the branch was initially created

If you want the entire repository to roll back to some old revision, you can use svn dump and svn load. Suppose your current repository revision is 1500 [HEAD] and the branch was created at revision 1000 and you want to go back to a state in the repository at revision 1000, you can do the following.

Create a dump of the repository from revision 1 to 1000.

svnadmin dump /var/repos/myrepo -r 0:1000 > dumpfile

Create a new repository

svnadmin create /var/repos/newrepo

Load the dump file to the newly created repo.

svnadmin load /var/repos/newrepo < dumpfile

svn provides dump filters too. I don't wanna confuse you and so, you can read more about dump filters Here

In case you don't want to move back to the prevision state of the entire repository, but you want to move back only one branch, you can merge backwards.

Checkout the branch to your local machine and merge back to the revision at which the branch was created and commit the changes.

svn merge -r 1500:1000 .

svn commit -m "Rolled back to r140"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top