Posted by gustav at 10:01AM, Friday, December 05th, 2003
A guide to cvs on windows
I've had the amusing task, lately, of setting up a cvs (Concurrent Versioning System) client on a Windows 2000 Professional machine, to access repositories shared with other clients running Mac OS X. For the enlightenment of anyone out there trying to do something similar, here's what I've learned.
First off, avoid "SourceSafe" like the plague. The name is misleading -- every time I've used SourceSafe, it has mangled, corrupted, misidentified, or otherwise wreaked havoc with my code. Besides which, it's only supported by Windows machines these days, as far as I can tell.
My needs for this are a little special. I've set up WinCVS before, and gotten it to work alright, but this time I'm accessing a remote repository over a firewall which forbids CVS connections in the clear. CVS has long provided support for SSH tunelling, but I'd never done that on a non-UNIX platform before.
I started by installing the development version of WinCVS recommended on the WinCVS site (wincvs.org), along with the version of SSH provided by the cygwin project (a port of a few UNIX utilities to Windows). After a couple of hangups (note: it's useful to click the rotating arrow icon on the cygwin package selection screen. That's a button, even if you might not guess it. Also, environment variables, specifically, PATH and CVSHOME, are your friends), I got CVS working -- more or less.
The less parts are, first, the absolute uselessness of the WinCVS GUI environment (anyone care to tell me how to do, well, *anything* in here? Give me a standard command line instead, please.) The second one comes when I try to check out files created on other, saner platforms. (You'll forgive me for not comprehending why anyone, ever, would use Windows, apart from, perhaps, masochism, or overwhelming susceptibility to isopraxis.) Regardless of the WinCVS setting for "Checkout text files with the Unix LF (0xa)," text files came out with lots of extraneous characters at the ends of lines -- you know, the stuff that Emacs displays as ^M^M. A little googling convinced me that WinCVS was a piss-poor choice for doing anything useful with files created on other platforms, and that I should use the CVS package included with cygwin instead.
The cygwin CVS is okay -- easy to install, at least. Unlike the WinCVS/cvsnt client, with this one I needed to add a CVS_RSH environment variable in order to work with SSH (just set CVS_RSH to ssh, assuming the cygwin bin directory is in your PATH.) After that, I got lots of problems trying to update files in my already-checked-out repositories. WinCVS and cygwin's CVS do *not* play well together. I ended up re-checking out everything (which is a huge pain in the butt, and time-consuming, too.) Still, after doing that, things have been going pretty well. Knock on wood.
I should note that with either cygwin or WinCVS, one can turn up very little useful information via Google. Both seem to have the requisite "You're a moron for trying to do that with my tool" posts from developers on mailing lists. WinCVS, though, wins the prize for supreme uselessness. I've been using GUIs since my Commodore 64 days, and, with WinCVS's GUI, I could not figure out how to do any of the day-to-day tasks for which I use CVS -- checking out a project, recursively updating a single folder, etc. Also, its command-line environment skeeves me out -- particularly if you're trying to do *any* integration with cygwin, which I find useful for providing things like a real shell. With the cygwin port, I'm able to do my normal CVS tasks, either via the cygwin-provided shell, or the standard but pitiful Windows command prompt, or even from within Emacs. It provides a lovely little island of sanity on my irrational Windows machine, and that's an impressive feat. Recommended for anyone who must use these awkward, backwards, self-contradictory monsters.
Posted by gustav at 2004-06-03 13:02:39
I've now had the unparalleled joy of connecting to a Windows cvs server, as well as to my Mac at home. There are a couple tricks for this with my version of cygwin.
First, specifying the cvsroot is not what I would call intuitive. To connect to this machine from my Mac, I just type in something like:
cvs -d pserver:[username]@[ip address]:d:/path/to/cvs login
Trying this on cygwin, I get an unhelpful error telling me I've mistyped the port number. I tried some sensible (to me) escape characters, and finally googled to find out that I needed to type:
cvs -d pserver:[username]@[ip address]:/d//path/to/cvs login
Of course I did. After running the above command, I got an error -- failed to open .cvspass for reading. I googled some more, and found I could pretty much safely ignore this error message.
WinCVS - at one point - was known to be unstable.
Posted by Eric at 2004-05-18 16:20:11
We gave up and put it on a Linux (and now, for various reasons, a NetBSD) machine. Mind you, this was three years ago...
However, if I were starting a new project today, I'd be running TortoiseSVN (http://tortoisesvn.tigris.org/) to connection to Subversion (http://subversion.tigris.org/)
OSX clients exist - http://fink.sourceforge.net/pdb/search.php?s=svn
All content copyright © 2001-2009 the owners of http://www.circa75.com/