Ticket #92 (closed defect: fixed)
Inconsistent newlines in PHP files
| Reported by: | DougWarner <silfreed-phing@…> | Owned by: | hans |
|---|---|---|---|
| Priority: | low | Milestone: | 2.3.0 |
| Component: | phing-core | Version: | 2.3.0beta1 |
| Keywords: | Cc: |
Description
Trying to add phing to my SVN repository gave me problems due to inconsistent newlines. I used the below command from the 'phing' directory to remove all DOS-style newlines that were there in addition to the UNIX newlines.
for i in `grep -rl ^M *`; do cat $i | perl -ne 's/^M//; print' > $i.tmp; mv $i.tmp $i; done
Attached is also a patchfile, but I'm not sure if the newlines will be preserved properly.
I would also recommend setting the svn:eol-style=native keyword to all PHP files once this is done. Adding the following lines to your ~/.subversion/config file will help with newly created .php files:
[auto-props] *.php = svn:eol-style=native
Attachments
Change History
Changed 5 years ago by DougWarner <silfreed-phing@…>
-
attachment
phing-inconsistent-newlines.diff
added
comment:1 Changed 5 years ago by hans
- Status changed from new to assigned
- Milestone set to 2.3.0
Thank you for this ticket. I'm sure this is largely my fault (and my IDEs that like to keep defaulting to DOS newlines). I'll run the replace line you provide against the codebase.
comment:2 Changed 4 years ago by hans
- Status changed from assigned to closed
- Resolution set to fixed
This should all be fixed now ... or at least, my conversions seems to have yielded no modified files.
comment:3 Changed 4 years ago by hans
Ok, my mistake; there were still a number of inconsistencies. These have been fixed in changeset:227.

Reparing DOS-style newlines