The cleanest way would be to undo changes
You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying --revision 303:302
, or by an equivalent --change -303
.)
I realize it does not "make it like that last commit never happened" in the sense that commit is still part of history, but I believe it is better to keep that bad commit in the history.
It could include some work in progress that can be queried / compared to, in order to easily remake a new proper commit.
Even if:
- the SVN (1.5) manual mention a future
obliterate
command that would accomplish the task of permanently deleting information, and
- mention
svndumpfilter
as a possible workaround (in that it provides the ability to quickly and easily modify that dumpfile data by acting as a path-based filter)
... It is better to not try twisting a SCM tool into something it is not meant to do in the first place.
Historization (along with parallelization with branching) are the two main features of an SCM.