Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [subversive-dev] Weird behavior of the "Compare with branch" feature


I did try it and this is obviously a bug in the plug-in code. And the reason it exists is that the compare functionality was made way before the SVN Java bindings got an API which allows to fetch comparison statuses between a working copy and the URL it is compared to.

So, next then why the direct compare between a working copy and its branch still won't work, though the API now exists. The compare functionality is actually supporting three-way comparison. I.e. we should still show the direction of the change (was it modified in the working copy or was it modified in the branch). And the diffStatus() API does not provide us with a way to know the direction of the change reported. So, there are still some manual handling needed to complete it the right way.

The description of the problem looks very similar to this one:

And yes, I think it should be fixed and we will work on it. If you do have any suggestions please feel free to tell us.


Thank you for your help with the bug diagnosis.

29.10.2015 13:01, fangebault+ml@xxxxxxxxxxxx wrote:

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
	└── 10

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

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

Then we modify and commit it (to /trunk)

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

The working copy now looks like this in eclipse:

     fakeproject/ 10
     └── src 10
	└── 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 \

I would be happy to work on fixing this behavior but first I'd like to
have feedback from the community about this.

Best regards,
Alexander Gurov,
Subversive Team.

Back to the top