Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to use an external cvs diff tool
How to use an external cvs diff tool [message #326787] Tue, 01 April 2008 13:26 Go to next message
Eclipse UserFriend
Originally posted by: thomas.leaute.epfl.ch

Hi all

Sorry for the long post; I would like to share my motivations (and
exasperations) with you, in case someone can suggest an alternative way
to do what I want to do.

I am having the following CVS-related issue. I have a CVS project that I
access using Eclipse. It is a Java project, with developers both on
Windows, Linux and Mac OS X.

I currently have lots of line-ending problems. When I do a diff to
compare a local file with its remote counterpart, the Eclipse diff tool
often shows that the whole files are different, just because the
line-ending conventions are different. This makes merging hell. I've
tried enabling and disabling the option "Convert text files to use
platform line endings", with no success.

Even on files that don't suffer from this line-endings issue, the
Eclipse diff tool too often misbehaves. Like, one method in a Java file
was inserted by some other user and committed to the repository; when I
compare my local copy (without that method) with its remote counterpart,
instead of showing that this method has been inserted there, it tries to
compare it with the following one in my local file.

The bottom line is: I don't want to hear about Eclipse's internal diff
tool anymore. I would like to use another one. Like, Apple's FileMerge.

I looked for a plugin that would allow me to use an external diff tool.
I only found an alpha-stage abandonware that was only implemented for
the comparison of two local files, and did not work with CVS.

So, I figured: OK; let's just use an external CVS tool such as CrossVC
whenever I need to compare and merge. CrossVC allows me to use FileMerge.

Then I start to run into the problem that Eclipse used its funky EXTSSH
protocol to checkout the project, and since it is non-standard, CrossVC
says "unknown access method."

So, I reconfigure Eclipse to use the EXT method instead, and re-checkout
the project. But then I need to use a non-standard SSH port. If I
specify it in Eclipse, it will add it to the CVSROOT, which is again
non-standard; CrossVC says I cannot specify a port number with the EXT
access method.

So... I am patient, I keep trying: I create a file .ssh/config in my
home directory (I am on a Mac), and I add an entry there that says which
port number should be used to connect to the server.

Eclipse ignores it.

I am at the point where I stopped using Eclipse to do any CVS-related
task. I just use CrossVC, and Eclipse doesn't know that the files are
version-controlled.

Would anyone have suggestions to make my life easier?...

Thanks a lot in advance
Re: How to use an external cvs diff tool [message #326873 is a reply to message #326787] Wed, 02 April 2008 13:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Thomas wrote:
> Hi all
>
> Sorry for the long post; I would like to share my motivations (and
> exasperations) with you, in case someone can suggest an alternative way
> to do what I want to do.
>
> I am having the following CVS-related issue. I have a CVS project that I
> access using Eclipse. It is a Java project, with developers both on
> Windows, Linux and Mac OS X.
>
> I currently have lots of line-ending problems. When I do a diff to
> compare a local file with its remote counterpart, the Eclipse diff tool
> often shows that the whole files are different, just because the
> line-ending conventions are different. This makes merging hell. I've
> tried enabling and disabling the option "Convert text files to use
> platform line endings", with no success.
>
> Even on files that don't suffer from this line-endings issue, the
> Eclipse diff tool too often misbehaves. Like, one method in a Java file
> was inserted by some other user and committed to the repository; when I
> compare my local copy (without that method) with its remote counterpart,
> instead of showing that this method has been inserted there, it tries to
> compare it with the following one in my local file.

My first question is, do you know about (and use) the "ignore
whitespace" option in the compare view? It is globally controlled in the
preferences (General > Compare/Patch), and there is a toolbar button to
toggle it when the Compare editor is open and has focus.
If you don't have that on, you should enable it to see if the misleading
comparisons get better.

If not, I urge you to post a couple of files that we can open up in
compare mode ourselves to see what you're seeing. Bottom line is that
many people use the compare view quite a lot and, except for the
occasional diff that throws it for a loop, I haven't seen anyone report
widespread problems like you are. So it would be helpful to see an
example of what you're fighting against.

Having said that,... (more below)

> So, I figured: OK; let's just use an external CVS tool such as CrossVC
> whenever I need to compare and merge. CrossVC allows me to use FileMerge.
>
> Then I start to run into the problem that Eclipse used its funky EXTSSH
> protocol to checkout the project, and since it is non-standard, CrossVC
> says "unknown access method."

extssh isn't "non-standard" as far as I know - other CVS clients seem to
support it. This query produces thousands of hits:
http://www.google.com/search?q=cvs+extssh+-eclipse


> So, I reconfigure Eclipse to use the EXT method instead, and re-checkout
> the project. But then I need to use a non-standard SSH port. If I
> specify it in Eclipse, it will add it to the CVSROOT, which is again
> non-standard; CrossVC says I cannot specify a port number with the EXT
> access method.
>
> So... I am patient, I keep trying: I create a file .ssh/config in my
> home directory (I am on a Mac), and I add an entry there that says which
> port number should be used to connect to the server.
>
> Eclipse ignores it.

Eclipse does not use command line cvs like many other tools - it has its
own client (for good reasons). That is why it doesn't use the same
config mechanisms as you are used to with the cvs command.


> I am at the point where I stopped using Eclipse to do any CVS-related
> task. I just use CrossVC, and Eclipse doesn't know that the files are
> version-controlled.

I honestly think you are giving up too soon. Eclipse's CVS client is *by
far* the best I've ever used, and I've used quite a few (though not
CrossVC). If there are bugs in it, they need to be reported so they can
be fixed; so I'd encourage you to report your findings with some more
details so they can be reproduced - that's the only way to make the tool
better, which is what we're all here for, right? ;-)

Eric
Re: How to use an external cvs diff tool [message #326928 is a reply to message #326873] Thu, 03 April 2008 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.domain.invalid

Eric Rizzo a écrit :
> Thomas wrote:
>> Hi all
>>
>
> Eclipse does not use command line cvs like many other tools - it has its
> own client (for good reasons). That is why it doesn't use the same
> config mechanisms as you are used to with the cvs command.

Is there others reasons that being able to monitor the process, meaning, being
able to stop/interrupt/show progress of all the commands before the end ? The
only major problem i see in using an external program is that you must wait
for him to have exited to have the results. And that's not always the case
(reading stdout for example to have intermediate results).

I'd like to know what are the reasons if you know them (could help me in my project).

>> I am at the point where I stopped using Eclipse to do any CVS-related
>> task. I just use CrossVC, and Eclipse doesn't know that the files are
>> version-controlled.
>
> I honestly think you are giving up too soon. Eclipse's CVS client is *by
> far* the best I've ever used, and I've used quite a few (though not
> CrossVC). If there are bugs in it, they need to be reported so they can
> be fixed; so I'd encourage you to report your findings with some more
> details so they can be reproduced - that's the only way to make the tool
> better, which is what we're all here for, right? ;-)
>
> Eric
Re: How to use an external cvs diff tool [message #326950 is a reply to message #326928] Thu, 03 April 2008 15:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Name wrote:
> Eric Rizzo a écrit :
>> Thomas wrote:
>>> Hi all
>>>
>>
>> Eclipse does not use command line cvs like many other tools - it has
>> its own client (for good reasons). That is why it doesn't use the same
>> config mechanisms as you are used to with the cvs command.
>
> Is there others reasons that being able to monitor the process, meaning,
> being
> able to stop/interrupt/show progress of all the commands before the end
> ? The
> only major problem i see in using an external program is that you must wait
> for him to have exited to have the results. And that's not always the case
> (reading stdout for example to have intermediate results).
>
> I'd like to know what are the reasons if you know them (could help me in
> my project).

Sorry, I don't have firsthand knowledge of the details. But if you look
at the sophisticated features and UI in the Eclipse CVS tooling, it
seems pretty obvious to me that writing their own client was the best
way to achieve that level of granular control. Another thing to keep in
mind is that the CVS client must be an implementation of the more
general Team API, again lending itself to a custom client rather than
hobbling something together using a command-line tool that you don't
control.
I can't imagine doing what they've done if I had to rely on the an
external process to actually talk to the server.

Eric
Re: How to use an external cvs diff tool [message #327037 is a reply to message #326873] Mon, 07 April 2008 13:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomas.leaute.epfl.ch

Eric Rizzo schreef:
> My first question is, do you know about (and use) the "ignore
> whitespace" option in the compare view? It is globally controlled in the
> preferences (General > Compare/Patch), and there is a toolbar button to
> toggle it when the Compare editor is open and has focus.
> If you don't have that on, you should enable it to see if the misleading
> comparisons get better.

Thanks for the tip. I tried this out and it seems to be helpful in case
of line ending issues.

> If not, I urge you to post a couple of files that we can open up in
> compare mode ourselves to see what you're seeing. Bottom line is that
> many people use the compare view quite a lot and, except for the
> occasional diff that throws it for a loop, I haven't seen anyone report
> widespread problems like you are. So it would be helpful to see an
> example of what you're fighting against.

Putting aside the line endings issue, I investigated a bit more the one
about one method being inserted and Eclipse trying to compare it with
the following method instead of recognizing it was inserted. I tried to
use Apple's FileMerge instead, and I realized that, contrary to what I
expected, it did not produce results that were any better than Eclipse's.

I guess on this case there were just too many small differences here and
there for any diff tool to produce satisfactory results.

I'll switch back to using Eclipse for CVS for a while, using the "ignore
white spaces" option whenever I am facing line ending issues, and
lowering my expectations as to what diff tools can do when there are
many differences between the two files.

Thanks again for your response

Thomas
Re: How to use an external cvs diff tool [message #327664 is a reply to message #326873] Mon, 28 April 2008 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomas.leaute.epfl.ch

Eric Rizzo schreef:

> I honestly think you are giving up too soon. Eclipse's CVS client is *by
> far* the best I've ever used, and I've used quite a few (though not
> CrossVC). If there are bugs in it, they need to be reported so they can
> be fixed; so I'd encourage you to report your findings with some more
> details so they can be reproduced - that's the only way to make the tool
> better, which is what we're all here for, right? ;-)

OK; so, here is a particular misbehavior that I am witnessing and that
is rather annoying.

I have a Java file under version control. Another user has modified his
version of the file, and committed its changes to the repository. In
particular, he added a few new methods. When I synchronize with the
repository, I can see the methods he added.

I don't want to do a cvs update on the file, because I don't agree with
all the new methods he introduced. So, I go through the list of changes,
and I click on the "Copy Current Change from Right to Left" on all the
new methods I want to add to my local version. For methods on which I
don't agree completely, I either ignore the change, or click on the same
button, but then modify the method in the left pane (in my local version).

Then I save the file, and this is when things go wrong.

First the diff tool looses track of where I was in the file when I saved
it. This is annoying, but OK; let's say I can live with it.

Second, for every new method I imported from the repository into my
local copy without modifying it, instead of seeing no difference between
my local copy and the copy in the repository, the Eclipse diff tool sees
two differences: it sees the method in my local version as absent from
the remote version, and the method in the remote version as absent from
the local version. Even if they are EXACTLY the same...

Re-synchronizing with the repository does not fix this. However, things
do get fixed if I mark the file as "merged."

Am I doing something wrong here?...

Thanks in advance

Thomas
Re: How to use an external cvs diff tool [message #327681 is a reply to message #327664] Mon, 28 April 2008 21:43 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Thomas wrote:
> Eric Rizzo schreef:
>
>> I honestly think you are giving up too soon. Eclipse's CVS client is
>> *by far* the best I've ever used, and I've used quite a few (though
>> not CrossVC). If there are bugs in it, they need to be reported so
>> they can be fixed; so I'd encourage you to report your findings with
>> some more details so they can be reproduced - that's the only way to
>> make the tool better, which is what we're all here for, right? ;-)
>
> OK; so, here is a particular misbehavior that I am witnessing and that
> is rather annoying.
>
> I have a Java file under version control. Another user has modified his
> version of the file, and committed its changes to the repository. In
> particular, he added a few new methods. When I synchronize with the
> repository, I can see the methods he added.
>
> I don't want to do a cvs update on the file, because I don't agree with
> all the new methods he introduced. So, I go through the list of changes,
> and I click on the "Copy Current Change from Right to Left" on all the
> new methods I want to add to my local version. For methods on which I
> don't agree completely, I either ignore the change, or click on the same
> button, but then modify the method in the left pane (in my local version).
>
> Then I save the file, and this is when things go wrong.
>
> First the diff tool looses track of where I was in the file when I saved
> it. This is annoying, but OK; let's say I can live with it.

Please enter a bug report about that. Sounds like it would be pretty
straightforward to fix (but I've been wrong on that front before, many
times ;-)

> Second, for every new method I imported from the repository into my
> local copy without modifying it, instead of seeing no difference between
> my local copy and the copy in the repository, the Eclipse diff tool sees
> two differences: it sees the method in my local version as absent from
> the remote version, and the method in the remote version as absent from
> the local version. Even if they are EXACTLY the same...

I just tried that exact scenario (I think), and it worked perfectly. I
had the same project checked out on 2 different machines. On one of them
I added 2 methods in different parts of the file (not right next to each
other), and checked it in. On the other machine I synced the project and
the diff view showed me the 2 incoming changes. I selected just one of
them to "Copy current change..." and then saved my local copy. The view
immediately reflected that there was now only 1 difference between the
local copy and the remote copy (although the file is now shown as a
conflict because I have modified the local copy).
On occasion I have seen it where the diff view did not update unless I
closed it and re-selected the file in the sync view, but only a couple
of times have I seen that.
I have done this kind of selective update many times (almost always when
there are conflicting changes that need manual merging) and it has
always worked as I expected.
I don't know what to tell you, because I can't reproduce what your
talking about. On both of my machines I am using Eclipse 3.3 (3.3.0 on
one and 3.3.2 on the other).
Normally I might ask for a screen shot but in this case that probably
won't help. Can you produce a short screen-cast recording so we can see
the details of the scenario you are going through? I suspect it has a
lot to do with the nature of the changes you are trying to take
piecemeal. Eclipse is only rendering the data that CVS diff command is
giving it; I'd like to see the kind of diff that produces the result
you're seeing.

Also, what versions of Eclipse are involved here? Are they on the same
platform + filesystem?


> Re-synchronizing with the repository does not fix this. However, things
> do get fixed if I mark the file as "merged."

Marking as merged tells Eclipse that you have updated the remote copy
manually and to no longer consider it as an incoming change, so all
differences are only outgoing (in other words, to use the remote
revision as the basis for comparing your local copy, instead of whatever
revision your local copy was originally checked out from). That is why
things appear to be "fixed" - there are no incoming changes any more.

Eric
Previous Topic:Native Launcher Behavior Change in 3.4?
Next Topic:update repository
Goto Forum:
  


Current Time: Sat Jul 13 00:30:47 GMT 2024

Powered by FUDForum. Page generated in 0.04548 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top