tags:

views:

83

answers:

4

Hi,

I'd like to find out what other methods are there to commit to a SVN repository? For example, I have some diff between files, svn status shows them clearly. Instead of svn committing, I'd like to have the diff exported into patches, for incremental commitment, say over 2 computers through a thumb drive. Is this possible?

What about binary files, is it still possible?

Essentially, I'm hoping to implement incremental commits through patches, or any alternative methods there are without a network.

Thanks!

+1  A: 

you can do svn diff > mypatch
git is much better with incremental patches, so you should check that out. Personally I find git to be pretty complicated, but it's worth it. If you're sticking with svn you can get the diff for individual files, but I don't think there is no way to get diffs over time for a single file. you HAVE to manually save patches yourself to do that.

Chris H
I'd love to use GIT, but the learning curve is insanely steep. What about binary files? How do I add the binary files into revision control as well?
nubela
Well I'm not on a unix machine now to try it but maybe a different diff binary will do it. See http://stackoverflow.com/questions/317649/how-to-make-svn-diff-produce-file-that-patch-would-apply-when-svn-cp-or-svn-mv-w
Chris H
A: 

If you are using Java, you don't state a language. Then Intellij IDEA and Eclipse both support generating batch patch files for all changes in a tree.

fuzzy lollipop
+1  A: 

Once upon a time I worked at a company, say "Super Research Company (SRC)". The software was housed in a Subversion repository, which I had read access to and could see the logs. As part of the code review process, the manager (call him George) required all proposed checkins be emailed to him as a patch against the trunk. Should they be accepted, he would go ahead and check them in. George liked two things:

  1. Making sure all code "was written with such consistency that you couldn't tell who wrote it."
  2. Going on two week long business trips.

This led to the following remarkable characteristics of our software project:

  1. Code took on average 1 week to get reviewed from the time of submission.
  2. Checkins contained approximately two weeks worth of work.
  3. All checkins showed the same author in the log, so no one knew who to talk to in the event of a problem.
  4. About half of all checkins were rejected at first submission due to something like a comment having one too few indentations. I spent about 2/3 of my editing time in WinMerge looking for subtle indentation inconsistencies (there were detailed rules about vertical alignment for multi-line expressions).

Your proposal may show only one portion of this, but the horrific experience is so etched in my mind that I must warn you to seriously consider the ramifications of your decision.

That said, Subversion patches can be useful for projects receiving one-time submissions from external users, etc., so I don't think the idea of sending patches is conclusively wrong. :)

280Z28
+1  A: 

I would suggest you have a look at Mercurial with the hgsvn plugin. In contrast to git, Mercurial is relatively simple to learn if you know SVN. And with the hgsvn plugin, you can use Mercurial on the PC without network connection, synchronize with a thumb drive and commit the changes to SVN on a PC with network connection.

FRotthowe