How to see what will be updated from repository before issuing "svn update" command?

Svn

Svn Problem Overview


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.

Svn Solutions


Solution 1 - Svn

Try:

svn status --show-updates

or (the same but shorter):

svn status -u

Solution 2 - Svn

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 .

Solution 3 - Svn

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

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

More details here.

Solution 4 - Svn

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

svn diff -r BASE:HEAD .

Solution 5 - Svn

The same but shorter shorter :) :

svn st -u

Solution 6 - Svn

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.

Solution 7 - Svn

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEdward TanguayView Question on Stackoverflow
Solution 1 - SvnDave WebbView Answer on Stackoverflow
Solution 2 - SvnTianCaiBenBenView Answer on Stackoverflow
Solution 3 - SvnBen HoffsteinView Answer on Stackoverflow
Solution 4 - SvnJeffView Answer on Stackoverflow
Solution 5 - SvnKenzoView Answer on Stackoverflow
Solution 6 - SvnRory BeckerView Answer on Stackoverflow
Solution 7 - SvnAndrewView Answer on Stackoverflow