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 thei开发者_开发问答r working copy. Is it possible to do this?
Simpler scenario
Can you backup uncommitted svn changes?
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
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.
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.
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.
精彩评论