[Live-demo] setting svn props to deal with multi-platform checkins

Hamish hamish_b at yahoo.com
Sat Mar 5 19:36:01 PST 2011


Hi,

making an assumption based on a seeming no-op commit:

re. https://trac.osgeo.org/osgeo/changeset/5875
"fix dos2unix"
(No files)


the "correct" way to deal with auto-newline translation for text
files stored in svn is to make sure the svn:mime-type and
svn:eol-style properties are set. then everything just sort of
works as it should regardless if checkins came from/are going to
UNIX or DOS clients.

to make this a bit less of a PITA, here's the little shell script
I use from time to time on the svn repo to take care of this:
 https://trac.osgeo.org/grass/browser/grass-addons/tools/module_svn_propset.sh

it is dumb in the sense that it assumes the file extension is
accurate, so I only ever run it by hand on like *.rst *.txt
instead of bulk traversal of the source tree.

I last did a pass over the gisvm/trunk/ dirs a week or so ago,
and that was mostly for new screenshot images and to set svn
props on new translation files which were incorrectly put in
with "svn add", instead of "svn copy" from the english original
which would have propagated the correct props and change history
automatically.

if there's a newline problem or a file checked in with with the
executable bit which shouldn't have it, this will fix that.

see also https://trac.osgeo.org/grass/wiki/HowToSVN#Fileproperties


cheers,
Hamish



      



More information about the Osgeolive mailing list