SVN joins a local trunk into a branch

Disclaimer: I'm relatively new to SVN. Most of my experience is with GIT.

We have a production site with all the code on the SVN trunk. I have a verified instance that I made some changes to. We decided to create an affiliate for the function that I am creating. I went ahead and checked the branch. Now I have a local copy of the chest with my changes, which I need to merge into my local copy of the branch. As soon as I do this, I am going to undo the local copy of the chest, as I do not want my changes to be transferred to the production chest.

How can I collapse the code from the local SVN folder to another local SVN folder?

PS I am developing on Ubuntu 12.04. I have SVN Workbench installed (but I haven't actually used it) and I do most of my svn work through the command line. If there is a Linux GUI that would help with this, I agree too.

+7
source share
4 answers
  • Switch working copy with changes to branch
  • Fix
+2
source

As your experience with Git is more than experience with SVN, and you think that in DVCS style you can use SmartGit as an SVN client. It works like git-svn, but honestly translates full branches and merges cherry, ignores EOL processing properties, external and tags (which git-svn does not).

+1
source

Create a diff of your changes in the trunk, then apply this to your branch.

cd trunk svn diff > ../the-branch/yourchanges.diff svn revert -R . cd ../the-branch svn patch yourchanges.diff 

If the patch doesn’t like that you are in another branch, you can use the unix fix command

 patch -p0 < yourchanges.diff 

This will help you mainly there, but will not delete the files (this truncates them) and will not save changes to the svn properties.

+1
source

Well, because SVN is not DCVS, you cannot do this without: - Losing your history, - Or accessing the central repository.

I assume that you know how to merge with the central repository.

If you don't mind losing your story, you should create a local svn repository and import the local version of the trunk into it. Make this repo and copy the local branch file into it. Merge and confirm the result in the remote repository.

But then again, if your daily workflow involves a local staging area, you can switch to Git or Mercurial.

Bye

0
source

All Articles