TIMEX
TIMEX

Reputation: 271774

In SVN, how do I revert ONE file back to a certain revision?

Just one file, not the entire directory. Thanks.

Upvotes: 1

Views: 496

Answers (2)

Michael Hackner
Michael Hackner

Reputation: 8645

Updating to an old revision is rarely going to be what you want, because this will not allow you to make changes based on that old revision — SVN will complain about the file being out of date.

What you probably want to do is a reverse merge. This will make the old revision the new HEAD revision.

# roll back to revision 200, making it the new HEAD
svn merge -r HEAD:200 theone.file
svn commit

Upvotes: 12

Thomas
Thomas

Reputation: 181745

svn up -r200 theone.file

Upvotes: 0

Related Questions