Re: resource forks and cvs?
Re: resource forks and cvs?
- Subject: Re: resource forks and cvs?
- From: Chris Ridd <email@hidden>
- Date: Wed, 25 Sep 2002 15:24:32 +0100
On 25/9/02 1:55 pm, Randall Crenshaw <email@hidden> wrote:
>
--- Tomas Zahradnicky <email@hidden> wrote:
>
>
>> any info on how to preserve resource forks across cvs
>
>> import/check-out's. Is it a standard cvswrapper entry?
>
>> The file had no extension to check against.
>
>
>
> Use /Developer/Tools/DeRez. This will make .r source file
>
> from .rsrc.
>
> Then use /Developer/Tools/Rez to compile .r back into
>
> .rsrc.
>
>
>
>
Tomas,
>
Thank you for your reply. I have seen these tools. Is
>
there a shell test I can use to determine if a file has a
>
resource fork? Although it seems somewhat heavy-handed, it
I think Apple currently recommends that at the BSD level (eg when you're
writing shell scripts) you try to treat the file as a folder and access a
magic subdirectory. More precisely:
foo/..namedfork/rsrc
gives you a file's resource fork (zero length if no resource fork), and
foo/..namedfork/data
does the same thing for a data fork. You probably want to test that foo is a
file before doing that. This sh script snippet works for me:
if [ -f $file -a -s "$file/..namedfork/rsrc" ]; then
echo "$file has a resource fork"
fi
>
appears I have to pass **all** files through a cvs wrapper
>
to (a) check if it has an rFork and (b) if so, use
>
DeRez/Rez - while (c) making sure that the DeRez'ed file is
>
treated as a binary by cvs.
CVS simply doesn't understand resource forks, so yes in general that would
be what is needed. If you used DeRez/Rez en masse, then diffs aren't likely
to be terribly useful so I'd humbly suggest that CVS probably isn't what you
want to use if you've got lots of resource forks around. I don't know what
would be a good replacement :-( Try to migrate from storing resource forks
in your repository perhaps?
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.