tags:

views:

30

answers:

4

How to compare local copy of a file with latest one in Subversion using Tortoisesvn? I have all my files committed but there seems to be a difference somewhere and I am trying to find it.

A: 

The option you're searching is called "Diff".

This feature shows you both versions of the same file (local copy and latest in repository), highlighting any difference between them.

Vivien Barousse
I see only "Diff with previous version" and it doesn't pick the latest version.
Tony_Henrich
Yes, it is this option. This option actually shows differences between your code and the last version you checked out in your working directory, before starting to work on your file.If you want to see the latest version from the repository, you first need to update your file, then use "Diff with previous version".
Vivien Barousse
I did an update and a commit. The diff shows a line with a line thru it with old code. It doesn't show what the new code is. The repo-browser shows the correct line but it's not a side by side comparison. I just want to do a compare like any compare tool. One file is my file and the other is svn's. If another compare file can do it, that would be great.
Tony_Henrich
A: 

You right-click on the file you want to compare, expand TortoiseSVN and choose Diff.

If the file you have locally was edited since the last svn update you performed, it will have a red exclamation mark watermark on it's icon, if it doesn't then maybe you need to run svn update again and check the differences again.

Nico
Why do I see "Diff with previous version" but no "Diff"?
Tony_Henrich
I'd try updating first, then comparing with diff.
Nico
Did an update already. There's nothing new.
Tony_Henrich
Then why don't you just compare? if there's no difference then both proyects should be the same as long as the whole is in subversion, and then you should start looking at other things like how the computers are set-up (what browser is installed in each one, what devenvs, etc.)You could use WinMerge[ http://winmerge.org ] to run the diffs, it automatically runs when you compare files with tsvn
Nico
A: 

Right click on the checked out folder and do "check for modifications" from the TortoiseSVN menu - this shows you all the files that have not yet been committed.

If you are paranoid that there are differences when someone else checks out the code you could just do a 2nd check out to some other folder and use a tool like kdiff3 to compare the two.

Adam Butler
All files have been committed but I need to do a diff regardless if svn thinks everything is committed.
Tony_Henrich
If they are all committed they should be identical - why do you think they are not?
Adam Butler
Because the app behaves differently with another developer. I need to do a sanity check. No software is perfect.
Tony_Henrich
If you are paranoid that there are differences when someone else checks out the code you could just do a 2nd check out to some other folder and use a tool like kdiff3 to compare the two.
Adam Butler
A: 

Try using 'Cleanup' to attempt to resolve any inconsistencies.

Bernard
Did that. I still need to see diff's manually.
Tony_Henrich
Assuming you have updated your file with the latest changes from the repository, I would attempt to check out the branch again elsewhere, overwrite the file in question with your changes and use 'Diff' at this point. Perhaps working with a fresh branch that only includes the one changed file will allow Tortoise to recognize there are changes.
Bernard