simont: A picture of me in 2016 (Default)
simont ([personal profile] simont) wrote2003-09-29 10:58 am

(no subject)

I had the most realistic dream last night that I can remember having in ages.

It was on a geeky topic, which partially explains this. I dreamed that I'd experimentally started using Subversion for one of my source code repositories, to see whether it was any good yet. (So far, more than realistic – I fully intend to do this for real some time in the next week or two.)

Unfortunately, I had terrible trouble remembering to prefix my version control commands with ‘svn’ rather than ‘cvs’. (Seems plausible enough to me; that's a very long-standing finger habit.)

So what I did was this. I defined an alias called ‘cvs’ which printed something along the lines of ‘Oi, no, not that one!’ and did nothing else; and then I defined an alias called ‘svn’ which checked for the presence of a CVS subdirectory and ran the real ‘cvs’ if present, but otherwise called the real ‘svn’. That way, I trained myself rapidly into the new finger habit, ready for the moment when I switched over all my other repositories too.

That's so close to something I might have done in reality. In fact I might seriously consider doing just that when I get to the point where a reasonable number of my repositories are already Subversion!

[identity profile] simonb.livejournal.com 2003-09-29 03:43 am (UTC)(link)
I've got a little script called cvs which appears in my path before the real cvs command which allows me to handle multiple CVS repositories based on the directory it is in and is configured from comments placed within ~/.cvsrc which has proved quite useful; no reason you couldn't use something similar to call svn or cvs as required in the same manner.
cjwatson: (Default)

[personal profile] cjwatson 2003-09-29 04:10 am (UTC)(link)
The one reason that I haven't done this yet is that I have an extraordinarily evil directory at work which is both a CVS working copy and a Subversion working copy. :)
fanf: (Default)

[personal profile] fanf 2003-09-29 09:25 am (UTC)(link)
Um, why? The only time you need to tell cvs which repo to use is when you don't have a ./CVS directory, e.g. when doing cvs import or cvs checkout. I never have the CVSROOT environment variable set: I just rely on ./CVS/Root and very occasional use of cvs -d.

[identity profile] simonb.livejournal.com 2003-09-29 12:47 pm (UTC)(link)
You do if you're dealing with multiple CVS servers tho; thus I have a directory called ~/work/wcmc where all of my work stuff is checked out into and ~/work/bpfh where all of my stuff gets checked out into.

Whilst some of this info does get put into the CVS/Root file, things like a specific command name required for me to ssh into work (i.e. setting CVS_RSH) don't work.

The script originally came from WorldCom where every project had its own CVS repository thanks to the use of SourceForge and access was done via ssh

[identity profile] mtbc100.livejournal.com 2003-09-29 06:08 am (UTC)(link)
FWIW subversion seems okay for us. I wish DARCS were further along.