March 29th, 2012
1:33 pm
CVS error on commit: “added independently by second party”

Posted under CVS
Tags , , , ,

I received this error whilst performing a commit via Eclipse:-

The server reported an error while performing the "cvs add" command. cvs server: xxx added independently by second party

The error related to some test database scripts in the project. I searched for solutions to this, and found some comments about tagging the files as merged, but this was not really any help.

In the end, I examined the files using TortoiseCVS, and noted that the offending files were not flagged as being under source control – they did not have any icon decoration on them.

In the end the following steps solved the problem:-

  1. I made sure I had copies of them elsewhere, and then deleted them from the (TortoiseCVS managed) directory under the eclipse project.
  2. I then did an Update with TortoiseCVS – this reloaded the latest versions from CVS, and this time they were correctly icon-decorated as managed.
  3. I then copied the new versions in to replace these. When I did this, the new versions were correctly decorated in red as updated versions but known to CVS/Tortoise.
  4. I then did a commit with Eclipse, and this now proceeded without error.
  5. Finally to be safe, I did a file compare to check that the correct latest versions were in place.

This solved the problem. It appeared that somehow I had lost the required CVS metadata such that the files did not appear to be CVS managed. Tortoise was very helpful here – if you see files with no icon decoration, this is immediately suspicious.

No Comments »

December 18th, 2009
10:26 pm
Using CVS with Eclipse CVS / TortoiseCVS / CVSNT

Posted under CVS
Tags , , , ,

This post details the installation I use for CVS based source control, together with some usage points and gotchas I came across. My preferred installation consists of the Eclipse CVS plugin and TortoiseCVS on the client side. This gives the flexibility of CVS access both inside and outside Eclipse. In my experience both CVS clients coexist well, and changes in one are immediately  reflected correctly in the other as would be expected. My server side consists of CVSNT running on a separate repository server.

I have broken this tutorial down into linked sub-posts as it was becoming too monolithic and covered multiple topics. The steps are as follows :-

1/ Server Installation using CVSNT

3/ Client Installation, Configuration and usage notes- TortoiseCVS

4/ Client Installation, Configuration and Usage notes – Eclipse CVS Plugin

5/ Branching and Merging in Eclipse CVS and TortoiseCVS

No Comments »

December 18th, 2009
7:38 pm
Running CVSNT as a limited account under Windows XP Pro

Posted under CVS
Tags , , ,

To set this up, I gave the designated user full permissions on the repository root, with full inheritance to all subfolders and files. I also made the user the owner, but this may not have been required. I also gave full access to the designated temp directory (the one set up in CVSNT admin) to this user.

When I tried to use a dedicated ‘limited’ (non administrator) account under windows XP pro I received the following error when I tried a checkout of CVSROOT :-

CVSNT user does not have read access to CVSROOT

Initially I thought this was an issue blocking all checkouts, as with the user set as an administrator, this checkout is allowed. However, the error only occurs on CVSROOT – all other operations on other modules appear to work normally. As CVSROOT is created internally by CVSNT as part of the repository, we should not be checking it out anyway so this should not be a problem.

Setting up this way minimises security issues especially when saving an explicit password parameter in TortoiseCVS (with the pserver protocol) to get around the lack of password caching.

The CVSNT admin utility, under the Server Settings tab, allows an anonymous user to be specified, allowing anonymous access from the clients. I did test this briefly, but could not get it to play ball with TortoiseCVS – tortoise always seemed to get demands for a password and gave an error if I tried anonymous access. I googled for answers to no avail – no info was available on this setting. I combed the documentation but this all seems to be aimed at the command line interface to CVS rather than the GUI control panel interface used in CVSNT.

My final solution therefore was to use an explicit limited (non administrator) account, which works fine.

No Comments »

December 18th, 2009
5:07 pm
CVSNT – cvslock.exe crashes on new repository add

Posted under CVS
Tags , , ,

cvslock.exe sometimes crashes with the following pair of event log messages :-

  1. Failed to bind listening socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
  2. Faulting application cvslock.exe, version 0.0.0.0, faulting module advapi32.dll…

Initially I thought this was due to not adding it as a firewall/antivirus exception, but the error still appears to happen the first time a repository is created and brought up/reconfigured. The 2 errors appear to be related – the socket error may be due to cvslock being started twice in error (indeed, this may be the cause of the other error too.)

Once the repository configuration is up and stable, the error does not seem to occur.

When the error occurs, a systray icon for cvslock appears, and selecting the debug listing menu option for the tray icon displays the error “no ipv6 address found for host” in a command window.

I tried stopping the services, creating a new repository (which succeeds), and then starting the services. The cvslock service refuses to start, and the tray icon appears as above. After a few seconds, the tray icon disappears, and the service can be started as normal.

This does appear to be a cvslock issue related to new repository creation. As the workaround is straightforward, and operation appears stable after that, the bug appears to be a minor one.

No Comments »

December 18th, 2009
1:12 pm
Installing and configuring a CVSNT Repository Server

Posted under CVS
Tags , , ,

This post details the setup of a repository server on a Windows based PC.

Download and install the CSVNT server here.
Make sure you pick the Windows Server software and not the “client trial”.
If you show all downloads you need to pick a server OS, not a client OS like Windows XP, even if installing on Windows XP Pro like I was. (You cannot install on XP home at all  – you must have simple file sharing turned off and Windows XP Home cannot do this). In my case, simple file sharing was off as I had already turned off ForceGuest, see here.
You can pick a specific account for access, or use the client account  – I presume the user/password must also match the server if you are in a workgroup rather than a domain but I did not test this. My installation was in a Workgroup with a specific account on the server PC. Note that you should run CVSNT under an account on the server with the minimum of privilege, rather than an administrator account. See here for details on how to do this.

The server runs 2 services – CVSNT Dispatch Service and CVSNT Locking Service, which both need to autostart (this is done by default). The server administration is via a control panel utility which is also available via the start menus.

Ensure that Simple File Sharing is turned off.
Make sure that you exclude cvsservice.exe and cvslock.exe in both the Windows Firewall and any Antivirus software.
In my case failure to do this caused 2 problems :-

  1. cvslock.exe crashed soon after startup
  2. The repository was not visible at all from the client side (in Eclipse) and would not connect – connection timeouts occurred.

You can run multiple repositories from a CVSNT server. In my case I am using a common root – “D:\CVS Repositories” and a subfolder for each respository underneath. My Java repository is named /Java and is similarly connected this way on the client. Its Root is therefore defined as D:\CVS Repositories\Java.

Connecting to the server

In all cases I use the pserver protocol – the Eclipse plugin does not support many protocols natively and pserver is the most common. I use the same protocol for Tortoise..  The server does not mandate the protocol used by the client (as far as I know) so provided the plugin is loaded for the protocol (see plugins page in the CVSNT control panel server admin tool) it should work. Pserver apparently only encrypts passwords but if you are running on a secure internal development network behind a firewall this should not be an issue, and should also improve performance as the protocol is not having to encrypt everything.

No Comments »