tags:

views:

50

answers:

4

Say I've made changes to some files but I don't want to check them in. I want to save the changes in a batch file or some archive and then email them to another dev/myself/etc.. so that they can take a look at my changes and apply them to their working copy. Is it possible to do this?

Simpler scenario

Can you backup uncommited svn changes?

+2  A: 

If you want to just show them the changes that they can apply, you could create a patch.

svn diff > patchfile

If you've already committed, you can create a patch between different revisions.

For example, to create a patch of changes from 341 to the last revision:

svn diff -r 341:HEAD http://svn.example.com/repos/calc/trunk > patchfile

Dan McGrath
+3  A: 

Sure, use svn diff to grab a copy:

svn diff >modifications.patch

This creates a "patch" file that you can later move to another computer and apply there:

patch -p1 <modifications.patch

Note that if the remote computer has a working copy for a different revision of the Subversion repository, you may have conflicts when applying the patch. The patch program has a different process for resolving conflicts than Subversion itself.

Greg Hewgill
+4  A: 

If you are not confident in committing to the trunk, you can create a branch and commit there, and tell the other developers to check out that branch to review your changes.
When everything is ok you can then merge it to the trunk.

Davide Gualano
A: 

I've used a product called Code Collaborator that might take a manual step out of your process. It's a code review tool that integrates with SVN as well as other version control systems. You create a review, add your uncommitted changed files to it, invite others to the review, and they see a diff between your version and what's in the repository. Mind you, it's an expensive tool, but in my experience it's been well worth it. A thirty-day demo is available if you're up to trying it.

Bob Kaufman