Friday, February 3, 2012

subversion can't roll back source file.

Hmm.. If I misunderstand, please someone correct me.
Subversion doesn't support "clean" way to roll back source code!!  Again, delta based VCS is broken from the concept.  This is not an issue with "git".



If I messed up codes, but they are not checked in, then simply subversion rolls back happily.
"svn revert [filenames]"


I happily checked in a source change, and found out that I messed up later, merge comes into play.
From svn book, http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo


Command is simply this.
"svn merge -c -303 http://svn.example.com/repos/calc/trunk"


Now this is troublesome.  What if the revision 303 check-in is huge, with many other files checked-in together?
In other words, revision 303 contains my mess-up, but all other check-ins from other files are fine, what should we do?  We kill good changes simply exchange for roll back my bad change?


Does anyone know if merge can work in file level?