Monday, July 30, 2007

Connecting NetBeans 6 to a CVS repository on a shared drive

I'm sure there are others out there who've done this before but I wanted to make sure it was documented for myself. So, here's what you need:
  • NetBeans 6 M10 - older and new versions will probably work with this as well
  • cygwin - standard install plus cvs
Here are the steps:
  1. After NetBeans and cygwin are installed correctly, add the following environment variables:
    • CVS_EXE - <cygwin-install>\bin\cvs.exe
    • CVS_SERVER - <cygwin-install>\bin\cvs.exe
    • add <cygwin-install>\bin to your path
  2. Add a place in your cygwin virtual filesystem to set up the mount points, I created a /projects/projecname for each.
  3. Set up the mount points in cygwin (note that this is done from the windows command shell and not the cygwin bash shell):
    • >mount z:\shared\drive\path\to\cvs\repo /projects/projectname
    You'll have to do this for each repo you need to connect to.
  4. Now here's the really weird part. In the CVSROOT directory of your repo, there's a file named config. You need to edit this file and remove all the new-lines. This is very important as you won't be able to connect otherwise.
  5. All you need to do now is open up NetBeans and do a CVS checkout. The path will be something like :local:/projects/projectname
YMMV