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

Re: Problem with metadata? or???

From: Nathan Yospe <nyospe_at_gmail.com>
Date: 2006-10-21 03:13:44 CEST

On 10/20/06, Robert Cuadra <robert@cyberflowsolutions.com> wrote:
> I have a file with a '.osx' extension. If I copy the file from one
> computer to another, it runs fine. However, when i check it into svn, then
> check it back out, the file association is lost and it tries to launch in
> a text editor. Looking at the property list it is set as an executable,
> and it has the mime-type of application/octet-stream, both of which are
> the same on the working file.

> I'm really at a dead end here and have been stuck for days with this
> problem. Any help would be much appreciated.

> Thanks.

I'm assuming this is a MacOS X scenario...

A lot has been made of late about mac resource fork information being
stored in subversion.

Here are the bare facts:

Subversion doesn't store the resource fork.
File association (not default association for an extension, but
specific association for a file) is stored on the resource fork.

If you want to handle it specially, you can write a script to deal with this:
On MacOS X, from a shell (I use bash, ymmv), the resource fork is available.
for the file somefile.foo (which I have just created as an empty file
with a resource fork):
$ ls -l /my/path/to/somefile.foo
-rw-r--r-- 1 my_user wheel 0 Oct 20 16:45
$ ls -l /my/path/to/somefile.foo/rsrc
-rw-r--r-- 1 my_user wheel 12240 Oct 20 16:45

So, here's what the svn-rsrcadd.sh script needs to do:

cp ${path_to_file}/${file_name}/rsrc ${path_to_file}/.${file_name}.rsrc
svn add ${path_to_file}/.${file_name}.rsrc
svn propset meta:has-mac-rsrc ${path_to_file}/.${file_name}.rsrc
svn propset meta:mac-rsrc-for ${path_to_file}/${file_name}

Then there's the script that needs to be run on update.

Mine is far from complete, and I'm not going to give it out, having no
desire to maintain it.
I'm actually thinking it would be more appropriate to make it into a
mac specific patch for the command line client itself (and the
assorted associated libsvn_* files).

For the moment, I would suggest taking a look at, and modifying, asvn.

Nathan F. Yospe
SAP Labs, Los Angeles
MDM core library development

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Oct 21 03:14:20 2006

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.