[Zope3-dev] Reverting a committed change under SVN

Tim Peters tim at zope.com
Tue Jun 1 16:23:03 EDT 2004


For the first time today (under Subversion), I wanted to roll back a file to
undo the last checkin made to it.  I used

    svn update -r<old_revision>

to get back the pre-checkin version.  The working copy did change.  However,
svn status didn't think I had any local modifications, and svn commit also
considered it to be up-to-date.  svn diff -rHEAD:BASE realized it was
different, though.

Anyone else bump into this?  I ended up reproducing the old version by
hand-editing an up-to-date working copy to look like the old version, but
that's absurdly error-prone.  For a single file,

    svn cat -r<old_revision> THEFILE > THEFILE

manages to get SVN to believe I have an old reversion I really do want to
check in, but that's absurdly error-prone if there's more than one file
involved in a change.

I expect I must be missing something obvious here!

Hmm.

    svn merge -rHEAD:<old_revision> THEFILE

works too, and I bet that's the intended way.

OK, I'm happy again.  On the chance that it's not obvious to others, I'm
gonna mail this anyway.




More information about the Zope3-dev mailing list