Previous Next Contents

2. The MacCVS Client

2.1 Introduction

The first port on Macintosh was made by Mike Ladwig using CodeWarrior 9, GUSI 1.7.2 and cvs 1.84. It allowed to use MacCVS as a console program or as a MacPerl command.

A second port was made by Matthias Neeracher. He implemented cvs as a MPW tool and used the cvs 1.9 distribution, dmake and CodeWarrior 9. This version works nicely but was never included into the official release of cvs.

Both use the excellent Matthias Neeracher's GUSI Library (for Grand Unified Sockets Library) which allows to port easily Unix code on Macintosh.

Despite of this ports, the cvs implementation for Macintosh is still experimental and only the client side is avalaible.

This current port uses CodeWarrior Pro 3, the MSL library, cvs 1.10, GUSI 1.8.4, Waste 1.3, TCL 8.1 and optionnaly the KClient library (Kerberos authentication, a contribution of Miro Jurisic)

2.2 What is inside

This is my second tentative to port CVS for Macintosh.

The first time I used the port of Mike Ladwig and added a little UI to remember the CVSROOT and provide menu access.

Now using the Matthias Neeracher port, I've added again a little UI and also enhanced or added some capabilities to the MacCVS client to :

For more informations, look at the Hacking CVS section.

2.3 Binary and Text files

For the macintosh cvs client :

MacCVS now supply some controls when adding files : that's because many user make mistakes when adding files and forget to add "as binary" when the file is binary. It will warn you if you are about to make a mistake.

Important : You can force a binary file to be handled as plain binary when you add or import files : that's because sometimes you can accidentaly have a resource fork (like a CKID resource) onto a plain binary file (for example on a CW project, a GIF file...). If you want to add files types to be handled as plain binary, go to the preferences and add a new type.

Note : The resource fork on a text file is ignored. If you want to keep the resource fork of a text file, force to add the file as binary : but you won't be able to use this file on others platforms.

2.4 The "import" problem

The import command in cvs should be seen as inconsistent since it imports initially all the files as text files (so it makes a line feed conversion between the client and the server).

When the initial import is done and all the binary files have the binary attribute, the server and the client agree to not convert this files and everything is working finely.

So the problem appears ONLY during the first import, and cvs user know that the initial import is THE main difficulty with cvs.

Happy-fully, there are some turn-around :

That's why the MacCVS port was implemented for :

Very important note : You still have to set the binary preferences in order to force MacCVS to send the files as plain-binary to the server.

Very important note 2 : When you use plain binary files, be sure to have Internet Config well-configured for these files : if not, you may loose your plain binary representation and won't be able to open these files on others platforms (since they would be mac-encoded).

2.5 Getting started

2.6 Hacking MacCvs

The MacCvs port consists in :

What I've done after is to change a little bit client.c to oblige the client to convert the file whenever it sends it to the server. This allows to encode/decode the files in HQX format and also the disable/enable the line feed conversion when the file is flat (no resource fork) and is not a text file.


Previous Next Contents