Fantastic Mr Fox
Fantastic Mr Fox

Reputation: 33854

How to revert local code to previous revision svn

I would like to revert only the local code to previous versions.

For extra points, what i would like to do is to revert a folder to a previous version (only locally) and generate a file of differences from the version after it.

e.g. say I have version 100. I want version 99 and a diff between that and 100, then 98 and 99 etc.

Upvotes: 8

Views: 8891

Answers (3)

I recently had to revert to a particular revision to debug an older build and this worked like magic:

svn up -r 3340 (or whatever your desired revision number) I had to resolve all conflicts using "tc" option as I did not care about local changes (checked in everything I cared about prior to reverting)

To get back to head revision was simple too:

svn up

Note: a Better way to revert to a previous SVN revision of a file.

Upvotes: 1

Pankaj
Pankaj

Reputation: 5250

svn checkout url://repository/path@1234

to check out rev no 1234.

svn revert -R

to revert local modifications.

check here for more

Upvotes: 6

pfnuesel
pfnuesel

Reputation: 15300

svn update -r 99
svn diff -r 100

Upvotes: 12

Related Questions