Srikanth
Srikanth

Reputation: 12110

svn diff: Compare my local uncommited changes with an arbitrary version of the file from the repository

Let's say I've checked out revision 10 of hello.c which is the latest one in the repository. I've made some changes to hello.c locally in my workspace, but I haven't committed it yet. Now, how can I compare this local uncommitted changes made on top of revision 10 with, say, revision 7 of hello.c in the repository?

Thanks for your time!

Upvotes: 10

Views: 9235

Answers (2)

Eugene Yarmash
Eugene Yarmash

Reputation: 149806

To see how your working copy's modifications to the file hello.c compare against revision 7 use:

svn diff -r 7 hello.c

Upvotes: 15

Lizzan
Lizzan

Reputation: 1062

According to: http://svnbook.red-bean.com/en/1.0/re09.html

--revision N The client compares TARGET@N against working copy.

So it would be

svn diff -r 7 hello.c

Upvotes: 4

Related Questions