You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by William Bug <Wi...@drexel.edu> on 2004/07/30 14:01:08 UTC

eol crazy - trouble with "old" Mac OS eol (CR)

Hi All,

Thanks for all the helpful info posted to this list.

Unfortunately, I wasn't able to find a solution to the esoteric problem 
we've been experiencing.

As Mac OS X afficionados probably know, prior to OS X, Mac text files 
simply used the 'CR' character to terminate a line.  Once the Mac 
became a Unix-based OS (as of Mac OS X and the move to the Darwin Unix 
variant [Mach kernel + NetBSD services]), text files began using 'LF' 
to terminate lines by default, like other Unix OSes.

I've got an old Mac OS 9.x image processing environment for which we 
create several types of text files - *.c, *.cdf - all with very special 
roles within this environment.  Unfortunately, this old program 
requires 'CR' line endings on these ASCII files.  With 'LF' eol, it 
can't even open the files.

As SVN experts have attested to many times in this list, SVN by default 
is suppose to do "nothing" to your files.  If you commit/import text 
files containing 'CR' eols, that is what you should get when you 
checkout another copy of these files on another machine.

To some extent, this is certainly happening.  The Unix tools 'diff' and 
'wc' indicate the contents of the files before and after having been 
committed to the SVN repository are absolutely identical.

Unfortunately, for this old Mac OS (<= v 9.2.2) application to open 
these ASCII files, the Mac Finder 'Type' must be set to 'TEXT'.  
Otherwise, the files are simply invisible to this app; you don't see 
them in 'File Open' dialogs, nor can they be opened via I/O scripts.

If I set these Mac Finder parameters using a Mac application designed 
specifically for this purpose - e.g., Super File Info v1.2(v42) from 
the makers of BBEdit, BareBones Software - then I can use the files 
from within my image processing program.

I'd prefer not having to run my ASCII files through this Mac Finder 
utility after every 'svn checkout' and 'svn update'.  Can anyone 
suggest a way I might effect this goal?

If not, is there anyway to automatically run a program on the client 
side after each 'checkout' or 'update'.  This is strictly a client-side 
problem, as the server repository has no conception of old Mac OS 
Finder attributes.  I can write a simple AppleScript capable of easily 
setting this file type attribute for text files.  How might I set up my 
svn client to make use of this AS script upon each 'checkout' and 
'update'?

Many thanks for any help you can offer with this difficulty.

Cheers,
Bill Bug

Bill Bug
Senior Analyst/Ontological Engineer

Laboratory for Bioimaging  & Anatomical Informatics
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA	19129
215 991 8430 (ph)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: eol crazy - trouble with "old" Mac OS eol (CR)

Posted by Ryan Wilcox <ry...@mac.com>.
On 7/30/04, at 9:48 AM, Ben Collins-Sussman said:

>On Fri, 2004-07-30 at 09:01, William Bug wrote:
>
>> If not, is there anyway to automatically run a program on the client 
>> side after each 'checkout' or 'update'.  This is strictly a client-side 
>> problem, as the server repository has no conception of old Mac OS 
>> Finder attributes.  I can write a simple AppleScript capable of easily 
>> setting this file type attribute for text files.  How might I set up my 
>> svn client to make use of this AS script upon each 'checkout' and 
>> 'update'?
>
>svn has no client-side 'hook' or 'trigger' scripts, only server-side.
>
>Rather than doing
>
>   on unix:  svn update
>   on OS 9:  run applescript-script-to-set-resource-fork
>
>I think something simpler might be:
>
>   'binhex' the files and keep *those* under version control
>   on unix:  svn update
>   on OS 9:  unbinhex, perhaps as part of the build system?


Or perhaps write a shell script (like the one that follows:)

svn update
cd folderWithTheFiles/
/Developer/Tools/SetFile -c R*ch -t TEXT *   

then run the shell script instead of doing a svn update directly.

Hope this helps,
_Ryan Wilcox

================================================================
Wilcox Development Solutions:          http://www.wilcoxd.com
Toolsmiths for the Internet Age            PGP: 0x2F4E9C31

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: eol crazy - trouble with "old" Mac OS eol (CR)

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-07-30 at 09:01, William Bug wrote:

> If not, is there anyway to automatically run a program on the client 
> side after each 'checkout' or 'update'.  This is strictly a client-side 
> problem, as the server repository has no conception of old Mac OS 
> Finder attributes.  I can write a simple AppleScript capable of easily 
> setting this file type attribute for text files.  How might I set up my 
> svn client to make use of this AS script upon each 'checkout' and 
> 'update'?

svn has no client-side 'hook' or 'trigger' scripts, only server-side.

Rather than doing

   on unix:  svn update
   on OS 9:  run applescript-script-to-set-resource-fork

I think something simpler might be:

   'binhex' the files and keep *those* under version control
   on unix:  svn update
   on OS 9:  unbinhex, perhaps as part of the build system?

    


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org