For what it is worth, I've adjusted the svn_apply_autoprops.py script of 
subversion to apply dos2unix to all files, which should have the svn:eol-style 
property set. This clearly makes it much easier to clean your repository or 
import code into your svn repository. Mind, the new script won't have the 
functionality of the old script, so you should make 2 scripts.

Below is the diff.

Hth,

Nick Stolwijk

Diff:

---
> # $HeadURL: 
> http://svn.collab.net/repos/svn/branches/1.4.x/contrib/client-side/svn_apply_autoprops.py
>  $
> # $LastChangedRevision: 20790 $
> # $LastChangedDate: 2006-07-20 03:51:37 +0000 (Thu, 20 Jul 2006) $
> # $LastChangedBy: dlr $
114,117c114,116
<     if not dirname.count("target"):
<       print "Will not process files in '%s' because it does not have a '%s' " 
\
<             "directory." \
<             % (dirname, SVN_WC_ADM_DIR_NAME)
---
>     print "Will not process files in '%s' because it does not have a '%s' " \
>           "directory." \
>           % (dirname, SVN_WC_ADM_DIR_NAME)
132,138c131,138
<       command = ['svn', 'propset', prop[0], prop[1]]
<       for f in matching_filenames:
<         command += ["%s/%s" % (dirname, f)]
<
<       status = os.spawnvp(os.P_WAIT, 'svn', command)
<       if status:
<         print 'Command "%s" failed with exit status %s' \
---
>       if prop[0] == 'svn:eol-style':
>         command = ['dos2nix']
>         for f in matching_filenames:
>           command += ["%s/%s" % (dirname, f)]
>
>         status = os.spawnvp(os.P_WAIT, 'dos2unix', command)
>         if status:
>           print 'Command "%s" failed with exit status %s' \
140c140
<         sys.exit(1)
---
>           sys.exit(1)



-----Original Message-----
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Wed 1/23/2008 10:01 AM
To: Maven Users List
Subject: Re: End-of-line style plugin
 
2008/1/23, John Coleman <[EMAIL PROTECTED]>:
>
> I quickly threw together an end-of-line style plugin yesterday becausee
> of problems I had importing a large Maven project into subversion.
>
> The plugin will list any files under the src tree that have inconsistent
> <CR>, <CRLF> or <LF> line endings.
>
> It's a bit rough and ready, but if anyone else is interested I will
> consider sharing or publishing it.



It seems like a must-have plugin: sometimes I have problems with
inconsistent newlines. Does it produce a report? Does it manage the
svn:eol-style property, and in particular the "native" value?

Antonio

Reply via email to