You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Etienne M. Gagnon (JIRA)" <ji...@apache.org> on 2006/04/02 04:53:26 UTC

[jira] Created: (HARMONY-291) Set file properties in the Subversion repository

Set file properties in the Subversion repository
------------------------------------------------

         Key: HARMONY-291
         URL: http://issues.apache.org/jira/browse/HARMONY-291
     Project: Harmony
        Type: Improvement
  Components: Misc  
    Reporter: Etienne M. Gagnon
    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


[jira] Assigned: (HARMONY-291) Set file properties in the Subversion repository

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] Closed: (HARMONY-291) Set file properties in the Subversion repository

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-291?page=all ]

Nathan Beyer closed HARMONY-291.
--------------------------------

    Resolution: Fixed

I believe this has been addressed, at least for the most part.

> 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