[josm-dev] Coding style
Dirk Stöcker
openstreetmap at dstoecker.de
Tue Dec 23 14:16:17 GMT 2008
Hello,
to have a break point in coding style I changed all tab stops to spaces in
version 1169 of JOSM (not for plugins yet). I did not change anything else
in this revision nor did I do any reformating, so bad formated code will
still have bad format. But the majority of reformating is done. Everything
else can be done during changes, but whole reformating when doing changes
made the changes unreadable.
I did this after apllying all useful patches from Trac, so we have no
legacy stuff left.
When someone of you has modified files in SVN which should survive an
update, I suggest following:
a) copy the files into a separate directory
b) run following in that directory:
find -type f |perl -ne 'chomp;print "cat $_|expand -t4|perl -pe \"s/[ \\t]*\$//;\" >a && mv a $_\n"' >cmd
This commandline expands any tabs and removes spaces at the end of lines
c) Have a look at the output and afterwards execute "cmd"
d) svn revert all changes in JOSM src-directory
e) svn update
f) copy your saved files back into the correct places
It is a bit harder when you don't follow this suggestion. You then need to
use the backup files which SVN creates in case of conflicts.
Ciao
--
http://www.dstoecker.eu/ (PGP key available)
More information about the josm-dev
mailing list