Author: Hari Bhaskaran
Date: 24-03-02 05:52
My requirement:- I use multiple windows machines for editing
my code, sometimes my latop, sometimes my desktop, sometimes
ssh-ing directly on my FreeBSD server. I would also like to
manage the code via a cvs server with :pserver: authentication.
So I first setup a cvsserver with pserver type authentication
and tried using WinCVS from windows and cvs from the unix side.
The problem was the cvs "working directory" files created
from the server records the IP address of the repository and
that IP wouldn't route correctly when accessed from a different
machine. I would also be forced to use the default port number
2401 for cvs since the way of specifying non-default port
numbers seems to be different with wincvs 1.2 ( the latest
1.3 beta doesn't work on my machine - so I couldn't try that).
Another issue was that I wouldn't like to force myself
to checkin the code half way just because I would like to
move to patio and work with the laptop. So I
decided to sync the working directories across machines.
I run ssh and create tunnel from 127.0.0.1 port 2401 to
my-servers-ip port X where X can be any port (including 2401
itself). If X is anything other than 2401, you would need a
similar setup on the server machine as well (when u work directly
from the machine via ssh+vi).
Now I can do all cvs operations via the fake :pserver: connection
at 127.0.0.1:2401 and have that work from any machine so long
they have ssh. Using ssh tunnel has the added advantage that
I don't have to open up any port on the firewall even if I
am connected from outside (internet).
Now the working directories are rsynced across. BTW this setup does not require a rsync server setup.
Now whenever I want to switch my editing from my desktop to
laptop, I just save my files, run the 'upsync.sh' script,
go to the latop, run the 'downsync.sh' and fireup my editor.
When I am finally done with a version, tested everything,
I can checkin the files from whereever I am.
I can post the scripts if anyone is interested.
note: please remove the dots if u intend to reply.