[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Macintosh file considerations

From: Wade Williams <wadesworld_at_mac.com>
Date: 2002-06-01 06:08:52 CEST

Hi all,

I'm new to subversion and hope to be able to contribute soon (I've got a
ton of projects going on). I wanted to weigh in on two issues. I
searched the archives to see if these issues had been discussed and it
didn't appear so, but if I missed it, feel free to ignore me.

1) Hopefully this isn't a faux paus, but I was browsing through the
archives and I noticed this:

> 'dos', 'unix', or 'mac' - Use CRLF, LF, or LFCR, respectively.

in the "Ascii/binary detection" thread.

I wanted to point out that the correct line ending for the classic MacOS
is "CR".

Of course that becomes more complicated on MacOS X, since it is both a
Unix system and a Macintosh system. However, when using a command-line
application, the correct behavior would be to use Unix line endings as
the native format, since that's what other unix command-line programs do.

I believe "mac" line ending support should be in the code, in case
someone wants to write a "Classic" MacOS client, but on OS X, the
correct line ending should be Unix, whether a command-line or graphical
client.

2) Binary file handling

On the Macintosh, one of the legacy issues with which we have to deal is
multi-forked files. Those are now discouraged and will be going away
over time, but support will still need to be there for years to come.

Such files, if copied to a DOS or Unix filesystem, will become
corrupted, as the resource fork information will be lost. The way to
handle such files is to encode them into MacBinary III format, which
combines the resource fork, data fork and some metadata all into one
file.

Historically, once multi-fork files are encoded into MacBinary format,
they have been identified on web servers with an extension of ".bin" and
a MIME type of "application/octet-stream".

Preferably, files identified as Macintosh multi-fork binaries could be
run through a MacBinary encoder before storage in the repository, and of
course, decoded on checkout. If such a capability exists in subversion
to pre and post process files, I'd be willing to write a program/plug-
in/library to do the MacBinary encoding/decoding.

Any suggestions/thoughts appreciated, and I hope I'm not repeating old
issues.

Thanks,

Wade
Received on Sat Jun 1 14:06:24 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.