Opened 13 years ago
Closed 13 years ago
#1605 closed patch (fixed)
Set SVN properties for EOL or MIME type
Reported by: | Mike Taves | Owned by: | chodgson |
---|---|---|---|
Priority: | low | Milestone: | PostGIS 2.0.0 |
Component: | management | Version: | master |
Keywords: | Cc: |
Description
This is an extension to #1598, but modifies other details. Goes through the depth of trunk
.
Here is a summary of the modifications:
Set text files to svn:eol-style native
for:
- in general: *.txt, *.c, *.h, *.in, *.sql, *.java, *.xml
- other misc: *.ac, *.properties, *.m4, *.l, *.y, *_expected
- README*, Makefile*, and others without extensions
Set text files to svn:eol-style CRLF
for:
- *.bat
Set image MIME types:
- *.png ->
image/png
- *.gif ->
image/gif
- *.tif ->
image/tiff
- *.svg ->
image/svg+xml
- *.ico ->
image/vnd.microsoft.icon
- *.fig ->
image/x-xfig
Set other binary files:
- *.jar ->
application/java-archive
- *.shp, *.shp.expected ->
application/octet-stream
- *.dbf ->
application/dbf
- *.odt ->
application/vnd.oasis.opendocument.text
- *.pdf ->
application/pdf
Other changes:
- Corrected some odd "application/octed-stream" types to octet
- Removed
svn:mime-type
for *sh files (wasapplication/x-sh
), as these are not binary files - Switched the 'yes' (or '*') switch for
svn:executable
(some were 'no' or ' ') - Made several other *.py, *.sh, *.bat files "executable yes"
Although the patch only modifies SVN properties (no source changes), the subsequent svn up
command from clients will want to re-download the affected files. Please read through patch.
Also, you can view all properties with svn proplist -R -v * > allproperties
Attachments (1)
Change History (11)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Looks like recently resolved issue for SVN 1.7.0
Do you have svn patch
?
comment:4 by , 13 years ago
It turns out the original patch file was created with a too old version of SVN (1.5?). I've replaced the file, and regenerated the patch file using SVN 1.7.3, which does the trick (svn patch modify_svn_properties.patch
).
Commands to generate patch were along the lines of the following:
svn propdel -R svn:mime-type *.sh find . -iname \*.pl | xargs svn propset svn:eol-type native find . -iname \*.py | xargs svn propset svn:eol-type native find . -iname \*.sh | xargs svn propset svn:eol-type native find . -iname \*-sh | xargs svn propset svn:eol-type native find . -iname \*.bat | xargs svn propset svn:eol-type CRLF find . -iname \*.xml | xargs svn propset svn:eol-type native find . -iname \*.c | xargs svn propset svn:eol-type native find . -iname \*.h | xargs svn propset svn:eol-type native find . -iname \*.in | xargs svn propset svn:eol-type native find . -iname \*.ac | xargs svn propset svn:eol-type native find . -iname \*.txt | xargs svn propset svn:eol-type native find . -iname \*.java | xargs svn propset svn:eol-type native find . -iname \*.sql | xargs svn propset svn:eol-type native find . -iname \*.wkt | xargs svn propset svn:eol-type native find . -iname \*.properties | xargs svn propset svn:eol-type native find . -iname \*.conf | xargs svn propset svn:eol-type native find . -iname \*.config | xargs svn propset svn:eol-type native find . -iname \*.prefs | xargs svn propset svn:eol-type native find . -iname \*.css | xargs svn propset svn:eol-type native find . -iname \*.m4 | xargs svn propset svn:eol-type native find . -iname README\* | xargs svn propset svn:eol-type native find . -iname LICENSE\* | xargs svn propset svn:eol-type native find . -iname COPYING\* | xargs svn propset svn:eol-type native find . -iname CREDITS | xargs svn propset svn:eol-type native find . -iname NEWS | xargs svn propset svn:eol-type native find . -iname TODO\* | xargs svn propset svn:eol-type native find . -iname Makefile\* | xargs svn propset svn:eol-type native find . -iname \*_expected | xargs svn propset svn:eol-type native propset svn:eol-type native HOWTO_RELEASE MIGRATION STYLE liblwgeom/lwin_wkt_lex.l liblwgeom/lwin_wkt_parse.y find . -iname \*.png | xargs svn propset svn:mime-type image/png find . -iname \*.gif | xargs svn propset svn:mime-type image/gif find . -iname \*.tif | xargs svn propset svn:mime-type image/tiff find . -iname \*.svg | xargs svn propset svn:mime-type image/svg+xml find . -iname \*.ico | xargs svn propset svn:mime-type image/vnd.microsoft.icon find . -iname \*.fig | xargs svn propset svn:mime-type image/x-xfig find . -iname \*.jar | xargs svn propset svn:mime-type application/java-archive find . -iname \*.shp | xargs svn propset svn:mime-type application/octet-stream find . -iname \*.shp.expected | xargs svn propset svn:mime-type application/octet-stream find . -iname \*.dbf | xargs svn propset svn:mime-type application/dbf find . -iname \*.odt | xargs svn propset svn:mime-type application/vnd.oasis.opendocument.text find . -iname \*.pdf | xargs svn propset svn:mime-type application/pdf find . -iname \*.bat | xargs svn propset svn:executable yes find . -iname \*.sh | xargs svn propset svn:executable yes find . -iname \*-sh | xargs svn propset svn:executable yes find . -iname \*.pl | xargs svn propset svn:executable yes find . -iname \*.py | xargs svn propset svn:executable yes
comment:5 by , 13 years ago
Another thing to point out here: I remember when I was doing the Windows builds that the regression test output files need to unix-style (LF) in order to work correctly under MingW. Perhaps Regina can confirm that this is still the case, however I thought I should mention it if we are about to embark on a full-blown SVN property change mission.
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Done at r9323 except I set all the _expected files to LF, in accordance with the comment above.
comment:8 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
My bad .. the property svn:eol-type
does not exist, this should have been eol-style
svn propdel svn:eol-type * -R find . -iname \*.pl | xargs svn propset svn:eol-style native find . -iname \*.py | xargs svn propset svn:eol-style native find . -iname \*.sh | xargs svn propset svn:eol-style native find . -iname \*-sh | xargs svn propset svn:eol-style native find . -iname \*.xml | xargs svn propset svn:eol-style native find . -iname \*.c | xargs svn propset svn:eol-style native find . -iname \*.h | xargs svn propset svn:eol-style native find . -iname \*.in | xargs svn propset svn:eol-style native find . -iname \*.ac | xargs svn propset svn:eol-style native find . -iname \*.txt | xargs svn propset svn:eol-style native find . -iname \*.java | xargs svn propset svn:eol-style native find . -iname \*.sql | xargs svn propset svn:eol-style native find . -iname \*.wkt | xargs svn propset svn:eol-style native find . -iname \*.properties | xargs svn propset svn:eol-style native find . -iname \*.conf | xargs svn propset svn:eol-style native find . -iname \*.config | xargs svn propset svn:eol-style native find . -iname \*.prefs | xargs svn propset svn:eol-style native find . -iname \*.css | xargs svn propset svn:eol-style native find . -iname \*.m4 | xargs svn propset svn:eol-style native find . -iname README\* | xargs svn propset svn:eol-style native find . -iname LICENSE\* | xargs svn propset svn:eol-style native find . -iname COPYING\* | xargs svn propset svn:eol-style native find . -iname CREDITS | xargs svn propset svn:eol-style native find . -iname NEWS | xargs svn propset svn:eol-style native find . -iname TODO\* | xargs svn propset svn:eol-style native find . -iname Makefile\* | xargs svn propset svn:eol-style e native find . -iname \*.bat | xargs svn propset svn:eol-style CRLF find . -iname \*_expected | xargs svn propset svn:eol-style LF propset svn:eol-style native HOWTO_RELEASE MIGRATION STYLE liblwgeom/lwin_wkt_lex.l liblwgeom/lwin_wkt_parse.y
(note: attached patch above not updated)
Lastly, I'm trying to figure out why some of the properties from r9323 have a new-line. This appears to have broken some mime-type
s, e.g, compare rt_st_transform01.png: before after
For this file, I should see:
$ svn proplist -v doc/html/images/rt_st_transform01.png Properties on 'doc/html/images/rt_st_transform01.png': svn:mime-type image/png
but in r9323 I see:
$ svn proplist -v doc/html/images/rt_st_transform01.png Properties on 'doc/html/images/rt_st_transform01.png': svn:mime-type image/png
(note extra new line)
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Looks good, sorry for the svn noise!
How does one apply this?