Is CVS with Eclipse using the command line possible? - eclipse

I've been using Eclipse to do CVS checkout from within the Eclipse interface. Is it possible to do it using the command line just like any normal CVS program? When I type CVS in my command prompt now, I get the usual
cvs is not recognized as an internal or external command
but CVSing should be possible since it's part of Eclipse. Do I need to make changes to the environment vars? or what's needed

You need to install CVS to use it in a command line.
The document "Eclipse Compatibility with CVSNT and CVS 1.12.x" mentions:
The Eclipse CVS client is a Java implementation of a CVS client that does not require any other CVS client to be installed.
The advantage of this is that Eclipse CVS can be used without requiring the user to install any additional software.
See also compatibility FAQ:
1/ Does Eclipse use [WinCVS|CVS command-line client] to talk to the server?
No. Eclipse implements a CVS client in Java that talks directly to the server using the documented CVS protocol. No external CVS client is required.
2/ The command-line CVS client stores information in CVS folders. Does Eclipse do the same thing? If so, where are the folders?
Eclipse stores CVS sync information in CVS/ folders in the same way as the command-line CVS client does.
However, you rarely see these folders within Eclipse. They are marked using a Core facility called "team-private" which causes them to be hidden from view.
If you open a (non-Eclipse) file explorer you will see that these directories and their contents appear on the file system.
3/ Is Eclipse compatible with the command-line CVS client?
Eclipse Team CVS stores its meta information in a format that is compatible with the command-line CVS client. Thus you should be able to use a CVS command line client against Eclipse workspace files on disk. Please note that this support is experimental, and you may run into problems.

Related

How can I prevent TortoiseSVN database locking up?

I have a Windows 7 PC with the latest TortoiseSVN version (1.11.0 x64). Almost every time I want to commit changes to the server, I get the following error:
Commit failed (details follow):
Failed to load properties: sqlite[S5]: database is locked
Error unlocking locked dirs (details follow): sqlite[S5]: database is locked
Another process is blocking the working copy database, or the underlying filesystem does
not support file locking; if the working copy is on a network filesystem, make sure file
locking has been enabled on the file server.
It's easy to fix - I just go to the project root folder, do an SVN cleanup, and then the commit works fine. However, if I want to commit again a few minutes after that, it will most likely fail again and force me to do another cleanup. It gets really annoying.
Is there any way I can prevent these locks from happening? Any settings I can change on TortoiseSVN, or something?
A few more details:
Both my SVN projects and TortoiseSVN itself are placed in my local HDD (no network filesystem), and their folders are excluded from the antivirus software.
The working copy folder is not network shared (nor locally, I'm the only user on that PC).
I don't have Dropbox, Google Drive or any other cloud software sync'ing the folder, either.
It's specific to TortoiseSVN, I never get this error when I commit my changes from Eclipse.
I really don't think it's a TortoiseSVN bug though, I recently updated from version 1.9.6 to 1.11.0 and both had the same issue, if this really was a bug it surely would have been fixed... right? :)
I'm the only developer currently working with the projects (it's not an issue of my local database being out of date, or existing conflicts).
I also think the lock is caused by eclipse plugin. Here some more details about my setup and how I got rid of the problem:
Tortoise: TortoiseSVN 1.12.2, Build 28653 - 64 Bit , 2019/08/04 13:03:09
Subversion: Subversion 1.12.2, -release
Eclipse: Spring Tool Suite Version: 3.9.6.RELEASE (eclipse Eclipse 2018-09 (4.9.0))
SVN-Plugins in eclipse:
Subversive Revision Graph (Optional) 4.0.0.I20160226-1700
Subversive SVN Connectors 6.0.4.I20161211-1700
Subversive SVN Team Provider 4.0.5.I20170425-1700
SVNKit 1.8.14 Implementation (Optional) 6.0.4.I20161211-1700
Subversive SVN Integration for the M2E Project (Optional) 4.0.0.I20160226-1700
After de-installing the last (optional) plugin ("Subversive SVN Integration for the M2E Project") the lock on explorer's tortoise didn't occure anymore.
So I am happy because all functionality I use within eclipse still works, and tortoise in explorer works also. Usually I only use the "team/show annotation" context menu in eclipse, all other SVN stuff I do in explorer through tortoise.
Edit: the problem wasn't actually caused by Eclipse itself. It was either the Subversive plugin, or the SVNKit connector. I've switched to Subclipse and JavaHL, and the problem has completely disappeared. I haven't tried with Subclipse+SVNKit, nor Subversive+JavaHL, I guess one of these combinations will solve the problem too, and the other won't.
It seems that the problem is caused by Eclipse. We usually structure our SVN projects like this:
/trunk
/docs
/etc
/scripts
/source
/pom.xml
/src/main/...
I checkout the whole trunk (or some branch), and then import the source projects into Eclipse.
To manage code changes, I use the SVN sync view in Eclipse, which is more user-friendly (just my opinion) than TortoiseSVN. For changes outside the /source folder I have to use TortoiseSVN, since the files aren't in Eclipse.
The problem is that apparently, Eclipse has some background process which "updates the SVN cache" every few minutes, even if you didn't change anything on that project, just by having it open in the workspace. And it messes up TortoiseSVN, hence the errors unless I perform a cleanup.
There is an option in Eclipse, under Team > SVN > Performance, which allows to disable the SVN status cache... but the last time I tried, it didn't prevent the issue, it only made Eclipse SVN sync slower.
I guess my only choices here are to use different checkout folders for Eclipse and TortoiseSVN (ugh...), or to disable SVN in Eclipse and use always TortoiseSVN (ugh...).

Eclipse Project - need to have a copy locally and a copy on a remote server

I develop in PHP using Zend Studio - operating as an Eclipse plugin - has a really nice feature called "Automatic Upload" that can be configured on a per Project basis. This feature allows one to define a remote connection to a server for a Project, and also specify whether file copy to the remote server is "manual" or "on save".
We use the "on save" option extensively, as it allows us to edit a file via Eclipse, save it, and immediately see the file in play on our remote web server.
Specifically the functionality we are after is as follows:
Create or edit a local file in Eclipse
On Save of the local copy, automatically creates / updates the remote copy
On Delete of the local copy, deletes the remote copy
(cut/copy & paste behave in a conceptually equivalent way)
and
Manual batch "upload to remote" and "download from remote" menu options that allows full upload / download of all files as well as manual cherry picking of files to upload or download.
This feature is really nice and has very broad application so I expected it to be standard Eclipse functionality, however I have installed Eclipse Oxygen, and can't find it. I have subsequently done rather a lot of searching, and although there are some manual options that have appeared, the closest I can find to an automated copy equivalent is the Parallel Development Tools plug-in which provides a "Synchronized Project" option.
Synchronized Projects require git running on both local and remote and a git folder structure inserted into the Project. Additionally, hidden files are injected into every Project sub-folder.
The above renders Synchronized Projects too "heavy" and potentially problematic to manage for us.
So I am fairly desperately looking for an Eclipse Oxygen (or Neon is fine) plug-in that provides the functionality outlined above.
Your input is greatly welcomed. Thanks in advance!
While not exactly remote sync, a little lateral thinking has given me exactly what we need. What I did is as follows:
Remote (linux)
Install Samba
Use Samba to present the desired folder as a Windows share
Local (PC)
Windows File explorer
mapped the remote windows share to a local mapped drive
Eclipse
downloaded and installed the File Sync plug-in from Eclipse market place
right-clicked on my Project and selected Properties => File synchronisation, and configured the desired folders (setting the "remote" as the mapped drive)
and one final item (because we are mapping from a Windows local to a Linux remote) : Window => Preferences => General => Workspace Set "New text file line delimiter" to "Other => Unix"
And hey presto, everything is working 100%.
You can do this by a project builder Ant buildfile. Alternative, there are others build system that are implements the Eclipse project builder (to be executed on save), but which must be installed separately. You can also implement your own incremental project builder in Java.

Automatically fill changelog.txt after each SVN commit in any IDE

After trying to search for some information about "Dynamic change of changelog.txt file with IDE", i found nothing that could help me to find the answer.
Imagine that I've made some changes in numerous files (PHP Environment) using Eclipse PHP or JetBrains PHPStorm 3+, and i want to commit them into svn repository. Is it possible to configure any of these IDEs to dynamically fill changelog.txt file in predefined format with informations (Date, SVN Comment, etc...) ?
Thanks in advance for any info which will point to the answer.
Not aware of any plugins that do this automatically, but you could write a script using command-line svn tools (svn utilities are installed by default on Linux; on Windows you can use CollabNet SVN or similar). You can pull the svn logs and redirect to changelog.txt in a format you desire.
You can also do this in python using pysvn module.

Beyond Compare as default diff tool in Eclipse when using Mercurial?

Is there any way to make Beyond Compare 3 the default diff tool in Eclipse?
I'm using the Mercurial plugin and would like to use BC3 for diffing files and handling merge conflicts.
I'm only able to find solutions when it comes to CVS or SVN when searching this site.
See the following query for discussion on external diff tool for Mercurial Eclipse.
http://bitbucket.org/mercurialeclipse/main/issue/310/external-diff-tool
It suggests that standard approach for setting up external diff tool should suffice. So setting up ".hgrc" should work.
Since this is no different from any other setup, you can test it by using hg commands in shell. See if that throws any errors and then check out with eclipse.
The setting for external merge tool is available in the plugin settings.
http://bitbucket.org/mercurialeclipse/main/wiki/Installation_and_Configuration#main-preferences
[edit: with hgrc]
This will work when you use command line.
The following "ExtdiffExtension" extension should help.
The extdiff Mercurial extension allows you to use external programs to compare revisions, or revision with working dir. The external diff programs are called with a configurable set of options and two non-option arguments: paths to directories containing snapshots of files to compare.
You need to install Beyond Compare Eclipse Plugin (Beyond CVS) which would provide this functionality.
Cheers!!!

svn command line from eclipse

Hello is there a way to use svn command line from eclipse?
Within eclipse in my project browser i can righclick and then click team and than i have something like svn. Not sure which plugin it is. But it doesn't have button's to for example ignore files for uploading. That's why I want to to it command line. And my question is how to do it.
Ok so how can I use it from command line in windows xp?
The plugin you are probably using is Subclipse. It should have an "Add to svn:ignore" option. If not, try updating to the latest versions of Eclipse and Subclipse. In general subclipse should be enough and there is no need for the command line.
For Windows XP I recommend Tortoise SVN. It integrates with the Windows Explorer and offers you a graphical environment for all your needs. I would say that is much more stable than subclipse and very easy to use.
If you do want to use the command line tools, download and install svn-win32 from here. The command line tools could be helpful in merge and copy operations.
I should also point out that none of these methods interfere with each other. You can work with Tortoise SVN or the command line and subclipse won't be affected. All svn clients work by writing and reading from hidden directories called .svn. There is one such directory in every folder under source control. As long as the svn client software is of the same version, an svn client can write to these hidden folders and another one will be able to read from it. A problem could arise if one of the clients is updated to a version that uses a different protocol for writing to the .svn folders. In that case, older clients won't be able to read the information stored there. Upgrading them to the latest version will solve the problem.
Not sure what you're trying to do; sometimes it's better to describe the goal rather than the means you plan to do it.
Have you tried Subeclipse? It lets you use SVN inside Eclipse; it's great.
I'm not sure if you can use it from Eclipse, but nothing stops you from just using it. From cmd / xterm / whatever. It's not going to interfere with Eclipse in anyway, nor will it interfere with Subclipse (which I'm assuming is what you're using).
I'm using subclipse, and in generaly it works pretty well.
However, and I guess this is your problem, the Team Synchronization by default wants to add all files in my projects, not just the ones I add to version control. This is lame and frustrating, and apparently there's no way to turn it off. Screenshots for older versions, however, hints at the possibility of turning the "feature" off. Frustrating!
I'm not personally a fan of Subclipse - it slows the IDE a bit too much for my taste. Here is an alternative approach using External Tools and TortoiseSVN
Create a new External Tool
Call it SVN Commit
Set the Location to \bin\TortoiseProc.exe (mine is C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe)
Set the arguments to /command:commit /path:"${selected_resource_loc}"
Open the file / directory you want committed and run the external tool.
Interchange the commit in step four for additional commands. You can also add the specific tools to favorites and have them in a dropdown on the toolbar.
Additional Arguments Here
Not intended to be too presumptuous here, but I think you should look at whether Subversive or Subclipse actually solves problem in a different way than you intended. For instance, it is very much possible to ignore files and directories from being checked in, via Subclipse.
On the other hand, if you really want to hack away via the command prompt from Eclipse, you must install the Target Management project (supported for Eclipse Europa and Ganymede). Once you have that installed, you can launch a remote shell to your local machine and then type away on the command line :).
PS: I haven't used this approach ever; Subversive satisfied all my requirements of a SVN plugin in Eclipse.