harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-291) Set file properties in the Subversion repository
Date Sat, 11 Nov 2006 20:57:38 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-291?page=all ]

Nathan Beyer reassigned HARMONY-291:
------------------------------------

    Assignee: Nathan Beyer

> Set file properties in the Subversion repository
> ------------------------------------------------
>
>                 Key: HARMONY-291
>                 URL: http://issues.apache.org/jira/browse/HARMONY-291
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Misc
>            Reporter: Etienne M. Gagnon
>         Assigned To: Nathan Beyer
>            Priority: Trivial
>
> Currently, file properties are not set in the repository.  This causes much grief when
people work on text files in different systems (Windows, Linux).
> Ideally, the svn:mime-type property should be set for all files in the repository.  Minimally,
2 settings are needed:
> * Text files (*.java, *.c, *.h, Makefile, README, LICENSE, etc.):  
>   svn:mime-type : text/plain
>   svn:eol-style : native
> * Binary files
>   svn:mime-type : application/octet-stream
> Of course, one could go one step further and use more precise mime-types, such as text/html,
but the above is sufficient for usual Subversion usage.
> Occasionally, some files might need to maintain a specific EOL (end of line) setting,
e.g.:
> * Batch file for Windows (*.BAT)
>   svn:mime-type : text/plain
>   svn:eol-style : CRLF
> * bash script:
>   svn:mime-type : text/plain
>   svn:eol-style : LF
> Usually, the file extention is sufficient to determine the type of a file.  Here are
example scripts to set up the file properties efficiently (handles file names with spaces):
> $ # -- Handle *.java files
> $ find . -type f | grep -v '/\.svn/' | grep '\.java$' | awk '{print "\"" $0 "\""}' |
xargs svn ps svn:mime-type text/plain
> $ find . -type f | grep -v '/\.svn/' | grep '\.java$' | awk '{print "\"" $0 "\""}' |
xargs svn ps svn:eol-style native
> $
> $ # -- Handle *.jar files
> $ find . -type f | grep -v '/\.svn/' | grep '\.jar$' | awk '{print "\"" $0 "\""}' | xargs
svn ps svn:mime-type application/octet-stream
> The above must be repeated for each file extention, appropriately.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message