Check diff on file on server

I have a working copy of the repository on my machine, and I know that it has been updated on the server. I would like to know how to get the difference between the new version and the version in my working copy using the svn command line arguments.

Is there any way to do this?

+66
svn diff
Sep 22 '10 at 20:27
source share
2 answers

A working copy is a version of BASE. The latest copy from the repository is the HEAD version. This compares your working copy with the HEAD version:

 svn diff -r HEAD <file> 

In fact, this will reverse the changes in reverse order, i.e. will tell you how to switch from HEAD to BASE. Technically, you want:

 svn diff -r BASE:HEAD <file> 

Can you get rid of keyboard bangs? Only you and your deity know this answer.

+100
Sep 22 '10 at 20:34
source share

The difference between a working copy and HEAD ; the changes that will need to be made to what is now in the repository ( HEAD ) to create your working copy:

 svn diff -r HEAD --old=<file> 

Possible interest, the difference between BASE and HEAD ; Changes that have been checked in the repository since the last updated working copy:

 svn diff -r BASE:HEAD <file> 

And, of course, the difference between BASE and a working copy; Changes made since the last updated working copy:

 svn diff <file> 


Three versions are discussed: BASE , working copy, and HEAD .

  • BASE : <file> with the last checked out / updated. What working copy will return after using svn revert
  • working copy: local changes to <file> that were checked / updated most recently as BASE
  • HEAD : recent changes to the repository. Equivalent to BASE if there were no changes since <file> was checked / updated as a working copy.
+15
Jun 28 2018-12-12T00:
source share



All Articles