mabalenk
mabalenk

Reputation: 1043

How to revert single file in SVN to previous revision after directory move

I would like to revert a single file file.F90 in SVN to a previous revision. However, prior to last commit I have renamed (moved) directories. Now the standard command

svn up -r 16 branches/new/file.F90

simply deletes the new version of the file, but cannot fetch the old version. Any help will be highly appreciated.

Before the last commit directory branches/old was moved to branches/new with svn mv command.

Upvotes: 1

Views: 270

Answers (1)

David W.
David W.

Reputation: 107090

You can use svn cat to print out the file, and use the @ to pin the directory layout to a particular version of the file:

$ svn cat -r16 $REPO/branches/old/file.F90@16 > file.F90

Upvotes: 2

Related Questions