Odi's astoundingly incomplete notes
New entries | CodeUsing CVS in Eclipse and from the shell
When working with Eclipse against a CVS repository it is sometimes necessary to perform certain CVS operations on the command line. A simple example is creating a diff between arbitrary tags / dates or diffing by date on a branch. Even though the Eclipse help system has an explicit page about this problem, it only tells half the story.
There are two problems to solve:
1. Make Eclipse use the
By default Eclipse uses its proprietary
Now tell Eclipse to still use its built-in SSH client, open the Preferences dialog. Under Team > CVS > Ext Connection Method select Use another connection method type and select
2. Set the
Linux users will typically just include this in
Now you can use your CVS repository from Eclipse as well as from the command line.
There are two problems to solve:
1. Make Eclipse use the
ext
method.By default Eclipse uses its proprietary
extssh
method to connect to the repository, which command line CVS does not support. Go to the CVS Perspective, select the CVS location. Right-click and select Properties from the context menu. Set the connection type to ext
. Click Apply and say yes to convert existing projects.Now tell Eclipse to still use its built-in SSH client, open the Preferences dialog. Under Team > CVS > Ext Connection Method select Use another connection method type and select
extssh
.2. Set the
CVS_RSH
environment variable to ssh
.Linux users will typically just include this in
~/.profile
or ~/.bash_profile
. Windows users have a harder time. First, they can not use Cygwin, because Cygwin's CVS client is incompatible with the Windows line endings used in the CVS meta data generated by Eclipse. So they must use a real Windows CVS client like TortoiseCVS. Tortoise has a command line client (cvs.exe
). Plus it comes with an SSH client TortoisePlink.exe
. So in the System Control Panel, under Advanced click the Environment Variables button and add the CVS_RSH
variable and set it to the path to TortoisePlink.exe
. You should also include the path to cvs.exe
into the PATH
variable.Now you can use your CVS repository from Eclipse as well as from the command line.
Once project is checked out I have normal file structure on disk (CVS/Root, CVS/Repository, CVS/Entries).
Admittedly I do get Apache lock problem
once in a while and perhaps switching method
can cure _that_, but it's a different prob.
Also, please right-click a folder or a file in Navigator view and try "Compare with another branch or version" menu item. This gives you lots of flexibility to diff your current code against tags. (There's a tricks how to make "Refresh tags" operation faster but that's again a different topic). No I'm not saying you can diff against date on branch but as for arbitrary tags looks like you can do it from Eclipse.
Anton Tagunov
Happens to me quite often. At work we maintain a couple of branches (for production systems) of several projects. Sometimes a fix or feature is needed in the branches too and you get to know this only after you have committed. Thus the need to create patch files.
Of course life would be a little easier with changesets like git has.
Odi
It's exactly what I was looking for!
Thanks!