Opened 13 years ago
Closed 13 years ago
#1598 closed task (fixed)
Use consistent UNIX line endings
Reported by: | mwtoews | Owned by: | chodgson |
---|---|---|---|
Priority: | low | Milestone: | PostGIS 2.0.0 |
Component: | management | Version: | master |
Keywords: | Cc: |
Description
According to DevWikiComitGuidelines:
All source code in SVN should be in Unix text format as opposed to DOS text mode
I've found a significant list of DOS files in the SVN tree. This can be slightly problematic; take a look at "invalid_srid-2.0.patch" in #1596, which was a patch created on a UNIX system from a DOS file. The resulting patch file has mixed line endings, which can cause grief for the patch utility.
Examples of DOS files:
trunk/postgis/postgis.sql.in.c trunk/liblwgeom/measures3d.c ...
Of course, BAT files should probably be left alone:
trunk/extras/tiger_geocoder/tiger_2010/create_geocode.bat trunk/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.bat
Another type of line ending error (according to some) are text files without a newline character at the end. These files lack consistency, and appear truncated. Possible consequences include a gcc warning: "No newline at end of file".
Examples of files without newlines at the end:
trunk/LICENSE.TXT trunk/doc/faq.xml trunk/doc/html/image_src/de9im06.wkt trunk/liblwgeom/lwgeodetic.c ...
Possible exceptions are one-line text files, like Esri's .prj file (but there's none in the source tree).
Change History (10)
comment:1 by , 13 years ago
Priority: | medium → low |
---|---|
Type: | defect → task |
comment:2 by , 13 years ago
Full list
./doc/html/image_src/st_azimuthmath.sql ./doc/xsl/post_gis_day_cards.html.xsl ./doc/xsl/postgis_cheatsheet.html.xsl ./doc/xsl/postgis_comments.sql.xsl ./doc/xsl/raster_cheatsheet.html.xsl ./doc/xsl/raster_comments.sql.xsl ./doc/xsl/tiger_geocoder_cheatsheet.html.xsl ./doc/xsl/tiger_geocoder_comments.sql.xsl ./doc/xsl/topology_cheatsheet.html.xsl ./doc/xsl/topology_comments.sql.xsl ./extensions/postgis/META.json ./extensions/postgis_topology/META.json ./extras/tiger_geocoder/README ./extras/tiger_geocoder/tiger_2006andbefore/orig/tiger_geocoder.sql ./extras/tiger_geocoder/tiger_2006andbefore/README ./extras/tiger_geocoder/tiger_2010/create_geocode.bat ./extras/tiger_geocoder/tiger_2010/legacy_import/tiger2008/import_tiger_shps.sh ./extras/tiger_geocoder/tiger_2010/upgrade_geocoder.bat ./liblwgeom/lwout_x3d.c ./liblwgeom/measures3d.c ./liblwgeom/measures3d.h ./loader/shp2pgsql-gui.rc ./postgis/lwgeom_export.c ./postgis/lwgeom_rtree.h ./postgis/postgis.sql.in.c ./raster/scripts/plpgsql/st_addband.sql ./raster/scripts/plpgsql/st_geomextent2rastercoord.sql ./raster/scripts/plpgsql/st_mapalgebra_optimized.sql ./raster/scripts/plpgsql/st_multibandmapalgebra.sql ./raster/scripts/plpgsql/st_pixelaspoints.sql ./raster/scripts/plpgsql/st_querytables.sql ./raster/scripts/plpgsql/st_tile.sql ./raster/test/regress/create_rt_empty_raster_test.sql ./raster/test/regress/rt_hasnoband.sql ./raster/test/regress/rt_isempty.sql ./regress/concave_hull.sql ./regress/regress_index_nulls.sql ./regress/regress_lots_of_nulls.sql ./regress/regress_management.sql ./regress/sql-mm-circularstring.sql ./regress/sql-mm-compoundcurve.sql ./regress/sql-mm-curvepoly.sql ./regress/sql-mm-general.sql ./regress/sql-mm-multicurve.sql ./regress/sql-mm-multisurface.sql ./regress/sql-mm-serialize.sql
comment:6 by , 13 years ago
probably best to do an svn:eol-style = LF in place for all those and better someone else does it since I may royally screw up.
Even if I have my editor set to \n on commit my svn uses native mode so they loose it. I'm too blind to give up on tortoise svn as much as strk would like me to go pitch dark.
comment:7 by , 13 years ago
I think svn:eol-style=native
is suitable, as all clients should see their native EOLs when they fetch files from svn. Without this property (or auto-props for checking in new files), EOLs are not modified (e.g., if you check in a DOS text file from a Windows client, it won't modify it for the server or for any client).
This could be done using, e.g.:
svn propset svn:eol-style native postgis/*.c
comment:8 by , 13 years ago
eol-style set at r9270
robe, consider setting your tortoise autoprops to ensure new files also have the right properties…
http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-propertypage.html
comment:9 by , 13 years ago
Other svn:eol-style native
changes (among a few) are in a patch at #1605
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
They aren't consistent, but they're done in #1605.
I was thinking we could add —lineend=linux to astyle.sh, but 1.2.23 doesn't support that