[subversive-dev] Weird behavior of the "Compare with branch" feature
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.
└── 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 \
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:
└── 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 \
I would be happy to work on fixing this behavior but first I'd like to
have feedback from the community about this.
Linagora - Support OSSA