Sqcvs to the rescue! :-)

Göran Hultgren gohu at rocketmail.com
Wed Dec 19 20:17:19 UTC 2001


Howdy guys!

Ok, Tim, here is the latest incarnation of the elusive sqcvs - a CVS protocol implementation in
Squeak. By embedding this in VMMaker you should be able to add a button for checkout/update from
SF without too much trouble! The code only has one "DeltaModule" (using Henriks terminology) and
that is an added method in String. It also contains two classes from Comanche and some additions
to the class Socket together with that. That stuff should probably be incorporated in the standard
image I think.

I sat down today and fixed these things:

1. Changed back from my "foray into Flow land". Now I use 2 splendid classes from the ComSwiki
package - both are included in this changeset - SocketStream and BufferedStream. I hope that is ok
with Bolot! :-)

2. Added a class CVSDiskTree which is a subclass of CVSWorkingCopy using the filesystem (as normal
CVS clients do) as the place to hold the checked out files.

...which means that you now can do (check class side of CVSDiskTree):

(CVSDiskTree
	home: (FileDirectory default fullPathFor: 'temp')
	server: 'cvs.squeak.sourceforge.net'
	root: '/cvsroot/squeak'
	user: 'anonymous'
	password: '')
		checkoutModule: 'squeak/platforms/unix'

This actually checks out the directory squeak/platforms/unix from SourceForge. Then if you hold
onto the CVSDiskTree instance you can later do:

myDisktree updateLocalPath: 'squeak/'

(currently the path should end with a slash, don't ask... Need to clean those things up)

Important notes (off the top of my head):

1. Today CVSDiskTree does no line ending conversions. But if you are on an LF platform you are ok.
The CVS server always sends files with LFs. But this is an easy thing to fix.

2. I haven't added "compatibility" for keeping the local CVS state in the subdirectories "Cvs" as
CVS normally does. I hold the state in the CVSDiskTree instance (well, the superclass). So don't
loose it! :-) (This should also be quite easy to fix)

3. The time and date information on the files are not set correctly - I don't think Squeak can do
that currently? (little bit trickier...)

4. The update works BUT it is currently "crippled" since it doesn't keep track if a file has been
"modified" (timestamp check). That needs to get fixed... The current effect is that all the files
(instead of only the modified ones) get echoed to the server so that it can decide what to send in
return. (this should be easy to fix too)

5. Sqcvs has support for commits too (though we need to add support for multiple line commit
comments) but SourceForge only offers commits through SSH. And I don't think the Linux guy I met
at OOPSLA (can't remember the name) and helped out with installing Squeak has built SSH for Squeak
yet! ;-)

regards, Göran

PS. If you improve on this package, send me changesets. I will try to put in some more time into
it after christmas. If you want to play with it - turn on the Transcript printouts in CVSSocket.
:-) DS

PSS. I have briefly tested this in a 4599 3.2a image on Win98. I hope it works alright on other
platforms too. DSS

=====
Göran Hultgren, goran.hultgren at bluefish.se
GSM: +46 70 3933950, http://www.bluefish.se
"Department of Redundancy department." -- ThinkGeek

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQCVS-gh.cs.gz
Type: application/x-gzip-compressed
Size: 33713 bytes
Desc: SQCVS-gh.cs.gz
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011219/63d24099/SQCVS-gh.cs.bin


More information about the Squeak-dev mailing list