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 09:26   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 09:38    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 #327037 is a reply to message #326873] | 
Mon, 07 April 2008 09:15    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 11:01    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 17:43   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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
 |  
 |  
  |   
Goto Forum:
 
 Current Time: Tue Nov 04 06:25:16 EST 2025 
 Powered by  FUDForum. Page generated in 0.11880 seconds  
 |