Modify

Ticket #92 (closed defect: fixed)

Opened 5 years ago

Last modified 3 years ago

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

phing-inconsistent-newlines.diff Download (114.0 KB) - added by DougWarner <silfreed-phing@…> 5 years ago.
Reparing DOS-style newlines

Change History

Changed 5 years ago by DougWarner <silfreed-phing@…>

Reparing DOS-style newlines

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.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.