Setup the Subversion Configuration to Sane setting

Sadly, Subversion is by default configured with nonsense initial default values for commit times and end of line settings.

Tell Subversion to use commit times

In the default settings, if you check out files with subversion, then they will have their modification times set to the current time. This is incorrect:
  1. The ptII tree includes derived files that are generated by Autoconf, JavaCC and Antlr. If the commit times are not preserved, then the source file might have a mod time later than the derived file which means that either the tool must be run or else the build system must touch the derived file.
  2. If the commit times are preserved, the ls -ltr will quickly show which files were changed when

To change the Subversion configuration, hunt for the .subversion/config file. This file is created the first time Subversion is invoked.

Under Windows 7, you might find it as /Users/yourlogin/.subversion/config.

Under older versions of Windows, another place to look is c:/Documents and Settings/yourlogin/Application Data/Subversion/config.

If you have installed Cygwin, from within a Cygwin bash window, try $HOME/.subversion/config. If you have Cygwin and the directory does not exist, try running svn --version to create the directory.

Make this change to .subversion/config

      ### Set use-commit-times to make checkout/update/switch/revert
      ### put last-committed timestamps on every file touched.
      use-commit-times = yes
    

Tell Subversion to automatically set the eol style

With the default settings, if you use Subversion to add a makefile, then the file will be checked in with binary settings. When the file is checked on out non-Windows platforms, then the file will have \r\n characters, which will break Solaris /usr/ccs/bin/make and cause other problems.

In addition, we would like keyword strings like $Id: setupSubversion.htm 62242 2011-10-11 02:00:37Z bldmastr $ to be automatically expanded and updated.

Find the .subversion/config file and uncomment the enable-auto-props line so that it looks like:

      enable-auto-props = yes 
    

Also, uncomment the [auto-props] and the section below that sets the properties for the files. Also, set props for at least makefile, *.tcl and *.mk files. See $PTII/doc/coding/svn-config-auto-props.txt for a more complete set of properties.

The bottom of the .subversion/config file should look like:

      ### Settings for your ~/.subversion/config file.  To use this:
      ### 1) Edit your ~/.subversion/config file
      ### 2) Insert the contents of this file into your
      ###    ~/.subversion/config file
      ### 3) You must set "enable-auto-props" to yes
      ###    BEFORE the [auto-props] line.
      ###    _BE_SURE_ to check that [auto-props] does NOT appear twice
      ###    If you append the contents of this file at the end
      ###    Of your config file, you will need to comment out
      ###    the preexisting [auto-props] line.

      ### Set enable-auto-props to 'yes' to enable automatic properties
      ### for 'svn add' and 'svn import', it defaults to 'no'.
      ### Automatic properties are defined in the section 'auto-props'.
      ### For this to work, the "enable-auto-props = yes" line should
      ### be before the "[auto-props]" line.
      enable-auto-props	 = yes

      [auto-props]

      ### Section for configuring automatic properties.
      ### The format of the entries is:
      ###   file-name-pattern = propname[=value][;propname[=value]...]
      ### The file-name-pattern can contain wildcards (such as '*' and
      ### '?').  All entries which match will be applied to the file.
      ### Note that auto-props functionality must be enabled, which
      ### is typically done by setting the 'enable-auto-props' option.
      ###
      ### NOTE: There is a bug in svn-1.5 and earlier where lines
      ### that differ only in case cause problems - only the first
      ### line is read.  See
      ### http://subversion.tigris.org/issues/show_bug.cgi?id=2036
      ### 
      *.MF = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.aart = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.ac = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.am = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.apt = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.avi = svn:mime-type=video/avi
      *.bat = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.bsh = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.c = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.cat = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.cgi = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.classpath = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.cmd = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.cnd = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.conf = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.config = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.cpp = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.css = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.cwiki = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.data = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.dcl = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.doc = svn:mime-type=application/msword
      *.dsp = svn:eol-style=CRLF
      *.dsw = svn:eol-style=CRLF
      *.dtd = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.egrm = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.ent = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.fn = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.ft = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.fv = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.g = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.gif = svn:mime-type=image/gif
      *.grm = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.gz = svn:mime-type=application/x-gzip
      *.h = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.handlers = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.htc = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.html = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.ico = svn:mime-type=image/x-icon
      *.ihtml = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.in = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.java = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.jmx = svn:eol-style=LF
      *.jpg = svn:mime-type=image/jpeg
      *.jpg= svn:mime-type=image/jpeg
      *.js = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.jsp = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.junit = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.jx = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.m = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.m4 = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.manifest = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.mdo = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.meta = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.mf = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.mk = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.mod = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.mov = svn:mime-type=video/quicktime
      *.mpg = svn:mime-type=video/mpeg
      *.ms = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.n3 = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.nroff = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.patch = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.pdf = svn:mime-type=application/pdf
      *.pen = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.php = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.pl = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.pm = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.png = svn:mime-type=image/png
      *.pod = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.pom = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.ppt = svn:mime-type=application/powerpoint
      *.project = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.properties = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.py = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.rb = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.rdf = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.rnc = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.rng = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.rnx = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.roles = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.rss = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.schemas = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.sh = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.sh = svn:eol-style=native;svn:executable
      *.sql = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.svg = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.tcl = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.tgz = svn:mime-type=application/x-compressed
      *.tif = svn:mime-type=image/tiff
      *.tiff = svn:mime-type=image/tiff
      *.tld = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.txt = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.types = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.vm = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.vsl = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.wsdd = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.wsdl = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xargs = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xcat = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xconf = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xegrm = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xgrm = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xhtml = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xhtml2 = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xlex = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xlog = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xls = svn:mime-type=application/excel
      *.xmap = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xml = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xroles = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xsamples = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xsd = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xsl = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xslt = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xsp = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xtest = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xul = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xweb = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.xwelcome = svn:eol-style=native;svn:keywords=Author Date Id Revision
      *.zip = svn:mime-type=application/zip
      .htaccess = svn:eol-style=native;svn:keywords=Author Date Id Revision
      INSTALL = svn:eol-style=native;svn:keywords=Author Date Id Revision
      KEYS = svn:eol-style=native;svn:keywords=Author Date Id Revision
      LICENSE = svn:eol-style=native;svn:keywords=Author Date Id Revision
      makefile = svn:eol-style=native;svn:keywords=Author Date Id Revision
      Makefile = svn:eol-style=native;svn:keywords=Author Date Id Revision
      NOTICE = svn:eol-style=native;svn:keywords=Author Date Id Revision
      README = svn:eol-style=native;svn:keywords=Author Date Id Revision
      abs-linkmap = svn:eol-style=native;svn:keywords=Author Date Id Revision
      abs-menulinks = svn:eol-style=native;svn:keywords=Author Date Id Revision


    

See Subversion Users: Re: Setting svn:eol-style and http://maven.apache.org/developers/svn-eol-style.txt

BTW - To set the style on already checked in file, run:

      svn propset svn:eol-style native filename
    

To set the keywords on an already checked in file, run:

      svn propset svn:keywords "Author Date Id Revision" filename
    

Then run svn commit to commit the change.

The next step is to Set up the Eclipse ptII project .classpath for Ptolemy II.