>>>> "OP" == Ovidiu Predescu
<ovidiu(a)xemacs.org> writes:
OP> Since we are on this topic, I noticed that using CVS over SSH is very
OP> unreliable at
cvs.xemacs.org. The GCC people are using this method for several
OP> years now and it's been very reliable for them and certainly for me. I'm
OP> talking about files which are not checked-out/updated, sudden disconnects from
OP> the remote CVS server etc. Martin mentions this on the Web site. What is wrong
OP> with the
cvs.xemacs.org setup that makes it unreliable?
Set up your CVS so that all CVS operations that are r/o are done using
the anonymous :pserver:. Then, when you want to do some r/w thing,
use "cvs-rw" instead of "cvs". This has a good chance of making your
cvs xemacs operations more reliable.
The script below will need modification for use by non-martins...
: #-*- Perl -*-
eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge
if 0; # Author: Martin Buchholz
use strict;
(my $myName = $0) =~ s@.*/@@; my $usage="
Usage: $myName cvs-arg ...
Run cvs in r/w mode.
The idea is to do most CVS operations, especially checkout, in
read-only, or anonymous :pserver: mode, and only switch to ssh/:ext:
mode when performing write operations\n";
die $usage if !@ARGV || $ARGV[0] eq '-h';
die "Not a CVS repository\n" unless -r "CVS/Root";
open (ROOT, "< CVS/Root") or die "CVS/Root: $!";
chomp (my $root = <ROOT>);
# Make $root writable by switching from :pserver: to :ext:
# Modify the following two lines for your own CVS commits:
$root =~ s/:pserver:anonymous@(?=.*\bsourceforge\.net:)/:ext:mrb@/;
$root =~ s/:pserver:xemacs@(?=.*\bcvs\.xemacs\.org:)/:ext:martinb@/;
$ENV{CVS_RSH} = 'ssh';
$ENV{CVS_IGNORE_REMOTE_ROOT} = 'yes';
exec 'cvs', '-w', '-z3', '-d', $root, @ARGV
or die "Can't run cvs: $!\n";