118
votes

I've committed changes in numerous files to a SVN repository from Eclipse.

I then go to website directory on the linux box where I want to update these changes from the repository to the directory there.

I want to say "svn update project100" which will update the directories under "project100" with all my added and changed files, etc.

HOWEVER, I don't want to necessarily update changes that I didn't make. So I thought I could say "svn status project100" but when I do this I get a totally different list of changes that will be made, none of mine are in the list, which is odd.

Hence to be sure that only my changes are updated to the web directory, I am forced to navigate to every directory where I know there is a change that I made and explicitly update only those files, e.g. "svn update newfile1.php" etc. which is tedious.

Can anyone shed any light on the standard working procedure here, namely how do I get an accurate list of all the changes that are about to be made before I execute the "svn update" command? I thought it was the "status" command.

7

7 Answers

170
votes

Try:

svn status --show-updates

or (the same but shorter):

svn status -u
57
votes

Depending on what you want to know between your working copy and the latest svn server repository, without updating your local working copy, here is what you can do:

if you want to know what has been changed in svn server repository, run command:

$ svn st -u

if you want to know if the same file has been modified both in your local working copy and in svn server repository, run command:

$ svn st -u | grep -E '^M {7}\*'

if you want to get list of files changed between a particular revision and HEAD, run command:

$ svn diff -r revisionNumber:HEAD --summarize

if you want to get a list of files changed between paticular revisions, run command:

$ svn diff -r revisionNumber:anotherRevisionNumber --summarize

if you want to see what will be updated (without actually updating), run command:

$ svn merge --dry-run -r BASE:HEAD .

if you want to know what content of a particular file has been changed in svn server repository compared with your working copy, run command:

$ svn diff -r BASE:HEAD ./pathToYour/file

if you want to know what contents of all the files have been changed in svn server repository compared with your working copy, run command:

$ svn diff -r BASE:HEAD .
43
votes

You can see what will updated (without actually updating) by issuing:

svn merge --dry-run -r BASE:HEAD .

More details here.

17
votes

This is what I was looking for. Checked Google first, but svn help ended up coming through for me :)

svn diff -r BASE:HEAD .
15
votes

The same but shorter shorter :) :

svn st -u
0
votes

You can use 'svn diff' to see the difference between your working copy and the repository.

0
votes

In theory you could make all your changes in a branch which you created for your own use. You would then be reasonably sure that you were the only one committing to it.

IMHO feature development should be done like this.

Then you could update this target machine from this branch instead of from the trunk.