Re: Detecting CR eol

2010-09-09 Thread Campbell Allan
On Wednesday 08 Sep 2010, Ryan Schmidt wrote: On Sep 8, 2010, at 10:27, Campbell Allan wrote: Before sending my previous reply I had tested it with a file changed using unix2dos. Prior to the commit svn diff only shows the text changes ignoring the line endings. I haven't explicitly tested

Re: Detecting CR eol

2010-09-09 Thread Campbell Allan
On Wednesday 08 Sep 2010, Csaba Raduly wrote: Hi Giulio, On Wed, Sep 8, 2010 at 10:25 AM, Giulio Troccoli wrote: I am writing a pre-commit hook script in perl. One of the requirement is that all files (luckily they are all text files) have the svn:eol-style property set to LF and the

Re: Detecting CR eol

2010-09-09 Thread Nico Kadel-Garcia
On Wed, Sep 8, 2010 at 11:27 AM, Campbell Allan campbell.al...@sword-ciboodle.com wrote: The part of the book that I felt was relevant is when the line ending is set to native subversion will store the file in the repository with LF's only. The client is then changing this to reflect the

Detecting CR eol

2010-09-08 Thread Giulio Troccoli
I am writing a pre-commit hook script in perl. One of the requirement is that all files (luckly they are all text files) have the svn:eol-style property set to LF and the actual eol is indeed LF. If that's not the case I will reject the commit and direct the user to a page on our intranet to

Re: Detecting CR eol

2010-09-08 Thread Csaba Raduly
Hi Giulio, On Wed, Sep 8, 2010 at 10:25 AM, Giulio Troccoli wrote: I am writing a pre-commit hook script in perl. One of the requirement is that all files (luckily they are all text files) have the svn:eol-style property set to LF and the actual eol is indeed LF. If that's not the case I

Re: Detecting CR eol

2010-09-08 Thread Campbell Allan
On Wednesday 08 Sep 2010, Csaba Raduly wrote: Hi Giulio, On Wed, Sep 8, 2010 at 10:25 AM, Giulio Troccoli wrote: I am writing a pre-commit hook script in perl. One of the requirement is that all files (luckily they are all text files) have the svn:eol-style property set to LF and the

RE: Detecting CR eol

2010-09-08 Thread Giulio Troccoli
I don't believe you have to go to so much trouble in the pre-commit hook. If you have set the svn:eol-style property then subversion will ensure the file has those line endings on checkout and update them when committing into the repository. So all the hook needs to do is check for the

Re: Detecting CR eol

2010-09-08 Thread Campbell Allan
On Wednesday 08 Sep 2010, Giulio Troccoli wrote: I don't believe you have to go to so much trouble in the pre-commit hook. If you have set the svn:eol-style property then subversion will ensure the file has those line endings on checkout and update them when committing into the

Re: Detecting CR eol

2010-09-08 Thread Ryan Schmidt
On Sep 8, 2010, at 07:45, Campbell Allan wrote: On Wednesday 08 Sep 2010, Csaba Raduly wrote: I don't believe you have to go to so much trouble in the pre-commit hook. If you have set the svn:eol-style property then subversion will ensure the file has those line endings on checkout and

Re: Detecting CR eol

2010-09-08 Thread Ryan Schmidt
On Sep 8, 2010, at 10:27, Campbell Allan wrote: Before sending my previous reply I had tested it with a file changed using unix2dos. Prior to the commit svn diff only shows the text changes ignoring the line endings. I haven't explicitly tested changing a single line ending within the