Bug 484929 - Weird behavior of the "Compare with branch" feature
Summary: Weird behavior of the "Compare with branch" feature
Status: RESOLVED FIXED
Alias: None
Product: Subversive
Classification: Technology
Component: UI (show other bugs)
Version: 3.0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Alexander Gurov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-27 16:02 EST by Alexander Gurov CLA
Modified: 2015-12-27 16:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Gurov CLA 2015-12-27 16:02:33 EST
Florent Angebault wrote:

Hi,

It turns out that the "Compare with" feature is a bit counter-intuitive
and misleading when used with subversive.
Right-clicking on a folder in eclipse to compare it with a remote branch
let the user think that it will show differences between the working
copy of this folder and the remote folder on the chosen branch.
It appears to be untrue. Subversive will actually compare two remote
folders. The left part of the comparison is not the local folder but the
corresponding remote folder instead.


Such scenario is harmless when the local copy is in sync with the SVN
repository but below I describe a simplified use case where the "Compare
with" is misleading and therefore can make developers make wrong decisions.
To make it easier to read, I'll describe the use case with command
lines, but those can be performed from within eclipse too.

Let's say we checkout the following project from a local SVN repository
file:///repo/fakeproject/trunk/ at revision 10.

    fakeproject/ 10
    └── src 10
	└── Main.java 10

Then we create branch /branches/mybranch while keeping the working copy
tracking the /trunk.

    svn cp file:///repo/fakeproject/trunk \
           file:///repo/fakeproject/branches/mybranch

Then we modify Main.java and commit it (to /trunk)

    echo "// important modification" >> src/Main.java
    svn commit -m "bug fixed" src/Main.java

The working copy now looks like this in eclipse:

    fakeproject/ 10
    └── src 10
	└── Main.java 12

From now on, if we right-click on src/ and select "Compare with >
Branch... > mybranch", a popup says: "There are no differences between
the selected inputs". But we know that there is actually a difference in
at least on file under this folder.
This is misleading because the user probably expects the same behavior
as this command line:

    svn diff src/ file:///repo/fakeproject/branches/mybranch/src/

What is happening instead is something equivalent to this:

    svn diff file:///repo/fakeproject/trunk/src@10 \
             file:///repo/fakeproject/branches/mybranch/src/@12


I would be happy to work on fixing this behavior but first I'd like to
have feedback from the community about this.
Comment 1 Alexander Gurov CLA 2015-12-27 16:09:40 EST
Works with SVN 1.8.x clients now.
SVN Kit 1.7.14 does not provide support for working copy-to-URL comparison. So, the patch would not work with SVN Kit 1.7.14 at all. I can't check with JavaHL 1.7.x now since it's troublesome in my configuration, but I guess it'll be the same anyway, because the error message I've got said something like "diff summarize could be performed only on the URL-to-URL basis".