Dear Devs,GNU Emacs 24.3 was behaving a little odd today while trying to display a svn diff from Annotate mode. It simply barked "svn: Unable to find repository location for '...' in revision ..." at me :-(. Since this wasn't the first time Emacs left me in the rain like this, I thought it was time to take a closer look.
This much I was able to figure out:If you copy a file from revision N-1, modify the copy and then commit it as revision N, 'svn diff -cN FILE' works as expected afterwards. It works no matter whether you use Subversion 1.6 or 1.8, no matter whether you specify FILE as a working copy path or a repository URL. "Works as expected" meaning that it shows the modifications you made, not the entire file as an add.
However, if you copy a file from a revision M that is smaller than N-1, modify the copy and then commit it as revision N, 'svn diff -cN FILE' won't play along. Subversion 1.6 simply barks "svn: Unable to find repository location for 'FILE' in revision N-1", whereas Subversion 1.8 shows the whole file as an add, i.e. does a diff -r0:N :-(. An 'svn diff -rM:N FILE' on the other hand works fine.
Emacs executes 'svn --non-interactive diff -r N-1:N FILE' for revision N at the current line when you press d in Annotate mode, which of course barfs just as much as 'diff -cN' does in the described case with M < N-1.
Would it be possible to spice up the semantics of -cN a bit?I don't know enough about the innards of Subversion to understand why -rM:N works but -rN-1:N doesn't, but I think trying to figure out the correct value of M for the current line in Emacs' Annotate mode might get painfull.
I've appended a little script to this mail that reproduces the problem. Kind Regards, Tobias
svn-diff.sh
Description: application/shellscript