views:

970

answers:

5

I have a folder checked out using TortoiseSVN. If I copy a newer version of a file over the existing versioned file, TortoiseSVN correctly identifies that the file is modified. However when I do a "diff with previous version", it reports "no differences".

If I use WinMerge I can see that the files ARE different.

Does anyone know why the TortoiseSVN diff is failing?

+1  A: 

It may be your 'ignore white space' settings. If one is set to true, and this other is not, this behaviour will occur.

Nerdfest
A: 

There are textual differences between the two files - not just whitespace - ie they are visibly different.

Matthew Hegarty
A: 

Did the filename change in any way?

We had one case where someone copied a newer revision edited outside the working directory to the working directory. TortiseSVN marked the file has changed, but couldn't diff it. Turns out the original working copy was named "configfile.txt" and he renamed his "ConfigFile.txt" to make it more readable. When he named his file back to "configfile.txt" and copied that over, everything worked again.

Patrick Cuff
+3  A: 

Diff with previous is a different command than looking what changed in your workingcopy.

Previous is defined to be the version before the version you have in your workingcopy:

                 A revision argument can be one of:
                    NUMBER       revision number
                    '{' DATE '}' revision at start of the date
                    'HEAD'       latest in repository
                    'BASE'       base rev of item's working copy
                    'COMMITTED'  last commit at or before BASE
                    'PREV'       revision just before COMMITTED

If you don't see changes against PREVIOUS, your workingcopy reverted the changes of COMMITTED

Bert Huijben
A: 

Thanks Bert - that has identified the problem and a lesson learned for me!

I used the TortoiseSVN 'diff' command rather than 'diff with previous version' and that highlighted the changes. So it must have been that the version before the HEAD was exactly the same as my workingcopy - hence that's why I saw no differences in 'diff with previous version'.

Matthew Hegarty