Windows vs SourceForge (was RE: [Python-Dev] Just spotted on SourceForge main page)

Tim Peters tim_one@email.msn.com
Tue, 4 Jul 2000 01:01:48 -0400


[Tim]
> The great thing about all the instructions I've found so far is
> that they're written by people who apparently have no real understanding
> of how the underlying components (and/or Windows) work.

[an anonymous Guido replied in pvt]
> That was not my impression of Andy's instructions.  They were to the
> point and effective.

Yes, they certainly *looked* that way <wink>.  I didn't mean to slander
Andy!  His instructions didn't work for me, but then nobody else's did
either, and I've increasingly suspected it's because I've got so many
half-broken SSH, CVS, and WinCVS installations on this machine fighting each
other.

So, without an imminent release busting my homeless balls, I decided to take
the time to start over from scratch:

+ Ran an official uninstaller for everything that left one behind (only
WinCVS).

+ Manually tracked down all the crap WinCVS left behind in the registry
anyway, and deleted it.

+ Deleted all the ssh and cvs .exe's on machine.

+ Got the crap out of my autoexec.bat (I'm running Win98SE) that various
packages had inserted there (I *think* this stuff was left behind by the
SourceForge setup tool).

+ Deleted all the .ssh directories on my machine (and found some in
surprising places!  e.g., one was hiding under "\My Documents"(!)).

+ Got rid of an absurd \etc directory (again suspect the SF setup tool,
although several goofy sets of instructions demanded you create one of
these).

+ Nuked my entire Python tree.

+ Rebooted.

+ Did a full tape backup of the machine <wink -- but I've had it with this
junk>.

+ Retrieved Andy Robinson's instructions and tried them again.

Worked great!  I'll attach a modified version below, where I filled in
blanks and repaired (just a few) typos as I went along.  This should get you
a functional Windows cmdline CVS running with SourceForge, and I don't want
a GUI version anyway.  If there's anything here that isn't crystal clear or
doesn't work, gripe at me, not Andy ...

all's-well-that-ends-ly y'rs  - tim


Setting up a cmdline CVS to work with SourceForge under Windows
---------------------------------------------------------------
28-Jun-2000 Original by Andy Robinson (andy@reportlab.com)
03-Jul-2000 Modified by Tim Peters (tim_one@msn.com)

1. Get
    ftp.reportlab.com/tools/cvs-1.10-win.zip
    ftp.reportlab.com/tools/ssh-1.2.14-win32bin.zip
(copied from somewhere obscure for safety, I forget where)

2. Unzip these to a location on your path.  Type 'cvs'
and 'ssh' from somewhere else to verify.

3. Choose where to keep your CVS projects; let's assume
    C:\Code

4. Create a subdirectory C:\Code\.ssh  (yes, dot-ssh)

5. (see #8 for an alternative) Create two environment variables:
	HOME=C:\Code
	CVS_RSH=ssh
HOME must point to the directory above your .ssh directory.
On Win9x, this can be done in a batch file or autoexec.bat; e.g.,
    set HOME=c:\Code
    set CVS_RSH=ssh
Run the batch file, or reboot if you're using autoexec.bat.
On NT or 2000, go to Control Panel | System | Environment
and set them at either user or machine level.

6. If not done so, get a Sourceforge account and a project
you can log in to.

7. Teach SSH about your project's home, by doing
	ssh -l $USERNAME $MYPROJECT.sourceforge.net
where $USERNAME is your SourceForge login name and $MYPROJECT your
SourceForge project name.  You'll see
    Host "$MYPROJECT.sourceforge.net" added to the list of known hosts.
and then
    Creating random seed file ~/.ssh/random_seed.  This may take a while.
After a while it will prompt for a password.  Type your SourceForge
password and hit ENTER.  After some SourceForge msgs scroll by, you'll
be left at a SourceForge shell prompt.  Type
    exit
and hit ENTER.  Now you're back at the DOS prompt.

8. You will need either a lengthy command line or a batch file
for each sourceforge project.  I set cvsroot in a batch file
in my 'c:\code' directory, and have one such file for each
CVS project I use (about ten of them!):

set CVSROOT=:ext:$USERNAME@cvs.$MYPROJECT.sourceforge.net:/cvsroot/$DIRNAME

where $USERNAME and $MYPROJECT are again your SourceForge login and project
names, and $DIRNAME is the top-level directory in the SourceForge CVS tree;
a project can have several, but usually there is just one.  Note:  you can
keep HOME and CVS_SSH out of your permanent environment (see #5) by adding
those definitions to this batch file instead.

9. Execute this batch file.  You can now go to C:\Code and do
	cvs -z7 checkout $MYPROJECT
(z7 means 'compress network traffic', handy over dialup lines)

10. From now on, just use CVS normally, running this batch file first
each time you bring up a DOS box you're going to use for CVS work.  Note
that you'll be asked for your password each time you enter a CVS
command.

I wouldn't survive without Karl Fogel's book "Open Source Development
with CVS", Coriolis Press.  The CVS reference material (about 225 printed
pages!) from this book is available for free download from
    http://cvsbook.red-bean.com/

Footnote: for anonymous checkout, I think you just omit the 'my_user_name@'
part from the CVSROOT variable.

I hope this helps; let me know if people have any problems with the
instructions.

-
Andy Robinson
ReportLab