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

Re: Mac OS X Icon files (Invalid control character)

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-09-22 15:59:40 CEST

On Sep 22, 2005, at 15:09, Jens v.P. wrote:

> But I've tested another thing which makes me wonder why Subversion
> can't handle it, but maybe I'm to naive:
>
> - I can copy (command line: cp -R ..) the folder -- including its icon
> - I can tar the folder (tar -xzf ...) und untar it -- including its
> icon
>
> So, why can't I simply "svn import" the folder including its icon.
> Sure.. this is a very user centric point of view ;)

As of Mac OS X 10.4, Apple has expanded cp and related commands to
also copy the resource fork. Subversion has no such Mac-specific
enhancement.

> I've written a small Java app (zipping/unzipping a folder with an
> icon) testing what Java is doing with Icon-Files. The result is
> what the experts here probably have expected: The Icon\r file is
> added to the zip and extracted. But: After extracting, the icon
> file is present but no icon is shown. I think that's the data and
> resource fork problem.

Yes, your Java app only zips the data fork, which is empty.

I again suggest you store the icon, and all other resource-fork-based
files, in Rez format. That is, run DeRez on them to generate a
textual representation, then check those in to the repository. And
after you check them out again, you can run Rez on them in your build
process to recompile them into files with resource forks. Presumably
you'd use different names—like icon.r which you would compile to Icon
\r. And you probably want to have Subversion ignore Icon\r and the
other resource-fork-based files, just as you probably have Subversion
ignore all your other compiled files too.

AFAIK Apple has been using Rez-format text files to describe their
resources since the eighties. You should read about them here:

http://www.mactech.com/articles/mactech/Vol.14/14.09/RezIsYourFriend/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 22 16:01:41 2005

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

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