简体   繁体   中英

Alternative methods of commiting in SVN

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!

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.

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. :)

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM