Discussion:
This page is for people working on CVS for the
Macintosh.
Working Directory Formats
There is some discussion, and differing
implementations, of how to store working directories on
the Macintosh.
-
CVS/Repository files: should be
fine. Relative repositories (which MacCVS Pro writes)
are legitimate and MacCVS should accept them already.
The MacCVS Pro page mentioned below also mentions
some (relatively obscure) cases with modules.
-
ckid resource: This is the only way
on the Macintosh to mark a file as read-only. Both
MPW and CodeWarrior respect this setting. MPW also
looks at the version number and some of the other
fields (and/or makes that information available to
shell scripts). MacCVS Pro maintains this resource
but MacCVS does not.
-
mcvs resource: The issue is whether
to store this information in a resource or in the CVS
directory (or both). Speed is probably not a huge
issue (do some benchmarking if concerned). Having
resources in source files can be a pain when it comes
time to copy files and such (for the ckid resource
there apparently is a popular program called
OrphanFiles which removes the resource but it, of
course, doesn't deal with mcvs, which is
CVS-specific). Not all applications will preserve
ckid and mcvs resources when they edit the files.
MacCVS Pro maintains the mcvs resource but MacCVS
does not.
The main data in mcvs which is not in CVS/Entries
is the AppleSingle flag. This could be added to
CVS/Entries (or some other file in the CVS
directory) which is a win in the sense that one can
just copy in a binary file and have things work
without worrying about resources. If it really
wants to be in a resource, the fUnused, fUserID,
fFileID, fRevisionID fields in ckid are apparently
available for a version control system to use any
way it wants (as far as I know it won't break
development environments if CVS uses those fields
in its own way, although it might be a bad idea in
terms of not knowing whether a file was written by
CVS or some other version control tool).
The mcvs resource also contains the filename and
one might use this to detect renames.
-
Line endings: According to the
standard CVS working directory format (as documented
in the Cederqvist), both text files under version
control and the files in the CVS directory are stored
using the operating system's standard convention for
text files. On the Macintosh this would be CR-only to
end a line. As far as I know the existing
implementations all implement this (but don't quote
me on that :-)).
Repository Format
For the most part there is no compelling reason to add
any Macintosh-specific features to the CVS server. One
issue which obviously affects the repository is
resource forks. The current solution, which I believe
is adopted by both MacCVS and MacCVS Pro in a
compatible way, is to store files with resource forks
in AppleSingle format in the repository. MacCVSClient
1.4 also supports AppleSingle.
MacCVSClient also has a text-based format called RBL
which is mergeable (at least in some cases) and can be
used along with RCS keywords. So there are some nice
things about it but also some disadvantages (most
notably, it doesn't store data forks; I'm not sure why
not).
AppleEvents Interface
Various plug-ins and scripts may wish to drive CVS via
some kind of interface. It might be useful to consider
whether the various CVS clients might want to agree on
an interface. The most popular such interface for the
Mac is the AppleEvents interface supported by MacCVS;
I'm not aware of any similar interface supported by
MacCVS Pro or MacCVSClient.
|