info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: postwrite proxy server setup


From: Mark D. Baushke
Subject: Re: postwrite proxy server setup
Date: Tue, 05 Apr 2005 00:34:15 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

address@hidden writes:

>       I am trying to enable write proxy functionality by using
> CVS-1.12-11.But I have problem because primary servers will not
> automatically push changes to secondary server although I has set
> loginfo,postadmin,postwatch etc. scripts according to user manual,I have
> added "ALL rsync -gopr -essh ./ 192.168.1.1:/cvsroot/%p &" and "ALL rsync
> -gopr ./ 192.168.9.1:/cvsroot/%p &" into those files.

This will be wrong as '.' is the directory in the server's copy of your
modified tree and does not contain any ,v files. Also, you may find that
doing the backgrounding is best done inside of a shell script rather than
via the commit trigger line itself. You also need to worry about files being 
moved to or from the Attic, so the --delete switch is your friend.

   ALL background-rsync $CVSROOT/%p/. 192.168.1.1:/cvsroot/%p/.

where background-rsync may do something like this:

#!/bin/sh

exec >/dev/null
rsync -rglop --delete --exclude '#cvs.*' -essh ${1+"$@"} \
  >/var/log/cvs-rsync.log 2>&1 </dev/null &

Note that you will want to use the CVSROOT/config 'LockDir=/some/path'
so that you don't rsync the cvs locks to your secondary, or you will want
to come up with some --exclude statements to use...

You may wish to take a look at the src/sanity.sh test cases that use
secondary updating $TESTDIR/sync-secondary ...

>       If I used ssh to commit some change to primary server,ssh tell me
> permission denied,But I am using "ext" connection method(I don't know if I
> can choose another connection method like pserver).

You may need to ensure that you are doing ssh-agent credential
forwarding. At present, the writeproxy stuff only works with :ext:
with either CVS_RSH=rsh or CVS_RSH=ssh, not with :pserver:

>       If I used rsh to commit changes directly to secondary
> server/cvsroot,then those change could be submitted into primary server by
> write through method,such as I have modified "history.txt,v" from version
> 1.1 to 1.2. later when I checked the same file in secondary server, I
> didn't find any change for "history.txt,v", instead I found a new file
> "history.txt" was located at secondary repository there which already
> contain latest change in this file.

        Good luck,
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFCUj933x41pRYZE/gRAji/AJ4sExGfquzTXS+wAMNjvKCQLan1vgCgyaIv
Rco5PXc0a87qz054j1aaDgI=
=pvf3
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]