For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > June 2004 > Re: [PEAR-QA] Re: CRLF -> LF









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] Re: CRLF -> LF
Lukas Smith

2004-06-11, 8:56 pm

Justin Patrin wrote:

> Daniel Convissor wrote:
>
[color=darkred]
> I completely agree, especially when the file is inconsistent.


+1

regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com

Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin

Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
Arnaud Limbourg

2004-06-11, 8:56 pm

> > I completely agree, especially when the file is inconsistent.
>
> +1


+1.

Arnaud.
Klaus Guenther

2004-06-11, 8:56 pm

Arnaud Limbourg wrote:

>
>+1.
>
>


+1

Klaus
Helgi Žormar

2004-06-12, 8:55 am

On Sat, 2004-06-12 at 11:47, Aidan Lister wrote:
> Add it to "pear package"?
>
> I develop on windows, I've no idea how to convert my files to \n only.
>


If you have good enough editor, you can configure this.
Stefan Neufeind

2004-06-12, 8:55 am

Might be doable for files with types like php or text etc. Maybe
someone with more packager-knowledge might propose a solution?

Stefan

On 12 Jun 2004 at 21:47, Aidan Lister wrote:
[color=darkred]
> Add it to "pear package"?
>
> I develop on windows, I've no idea how to convert my files to \n only.
>
> "Daniel Convissor" <danielc@analysisandsolutions.com> wrote in message
> news:20040611184913.GA12692@panix.com...
Php

2004-06-12, 3:56 pm

> Might be doable for files with types like php or text etc. Maybe
> someone with more packager-knowledge might propose a solution?

Of course it's possible, but will we also begin to fix other CS violations
in files? Also, in doing this, we'll /still/ keep a messy CVS with CR,
CRLF, LF, and files with multiple of those.
Also, forcing devs to fix these lineendings will XXXX with CVS. It'll
assume all the lines have changed, which makes diff's horrible to read.
Consider comparing your current/local version, to a version that's been
`fixed` for line-endings. By default, it'd mark all lines as changed,
eventhough few may be really changed.

Dev-education would be the best way to go here, not forcing them upon the
files at some point.

Cipri
Stefan Neufeind

2004-06-12, 3:56 pm

On 12 Jun 2004 at 14:26, PHP wrote:

> Of course it's possible, but will we also begin to fix other CS violations
> in files? Also, in doing this, we'll /still/ keep a messy CVS with CR,
> CRLF, LF, and files with multiple of those.
> Also, forcing devs to fix these lineendings will XXXX with CVS. It'll
> assume all the lines have changed, which makes diff's horrible to read.
> Consider comparing your current/local version, to a version that's been
> `fixed` for line-endings. By default, it'd mark all lines as changed,
> eventhough few may be really changed.
>
> Dev-education would be the best way to go here, not forcing them upon the
> files at some point.


Maybe auto-correcting the files on the cvs-server when commiting :-))
But honestly: Yeah, see the problem.

sn
Daniel Convissor

2004-06-12, 3:56 pm

Hi Folks:

I just updated the manual with the file format info...
http://cvs.php.net/diff.php/peardoc...24&r2=1.25&ty=u

Enjoy your wends,

--Dan

--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
Lukas Smith

2004-06-12, 3:56 pm

Stefan Neufeind wrote:
> On 12 Jun 2004 at 14:26, PHP wrote:
>
>
>
>
> Maybe auto-correcting the files on the cvs-server when commiting :-))
> But honestly: Yeah, see the problem.


Autocorrecting things is a dangerous thing imho. Its likely to do more
harm as good. Warnings is more approriate if all (similar to the API
prefix check that was implemented into pear package).

regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com

Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin

Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
Justin Patrin

2004-06-12, 3:56 pm

Php wrote:

>
> Of course it's possible, but will we also begin to fix other CS violations
> in files? Also, in doing this, we'll /still/ keep a messy CVS with CR,
> CRLF, LF, and files with multiple of those.
> Also, forcing devs to fix these lineendings will XXXX with CVS. It'll
> assume all the lines have changed, which makes diff's horrible to read.
> Consider comparing your current/local version, to a version that's been
> `fixed` for line-endings. By default, it'd mark all lines as changed,
> eventhough few may be really changed.
>
> Dev-education would be the best way to go here, not forcing them upon the
> files at some point.
>
> Cipri


You can ask for a diff that ignores whitespace changes.

--
paperCrane <Justin Patrin>
Justin Patrin

2004-06-12, 3:56 pm

Helgi Žormar wrote:

> On Sat, 2004-06-12 at 11:47, Aidan Lister wrote:
>
>
>
> If you have good enough editor, you can configure this.


Such as Scite.
http://www.scintilla.org/SciTE.html

--
paperCrane <Justin Patrin>
Helgi Žormar

2004-06-12, 3:56 pm

On Sat, 2004-06-12 at 19:07, Justin Patrin wrote:
> Helgi Žormar wrote:
>
>
> Such as Scite.
> http://www.scintilla.org/SciTE.html
>


Indeed, that's what I use anyway ;P
Andrey Demenev

2004-06-13, 3:56 am

Lukas Smith wrote:

> Stefan Neufeind wrote:
>

[..]
>
>
> Autocorrecting things is a dangerous thing imho. Its likely to do more
> harm as good. Warnings is more approriate if all (similar to the API
> prefix check that was implemented into pear package).
>

[..]

Forcing people to use correct line-endings does not solve the problem.
After CVS checkout on Windows, line-endings will be converted to CRLF,
even if checked in files used CR. After issueing pear package, the
tarball will contain files with "wrong" line-endings. I do think we need
auto-conversion (either in packager or in installer), if we care about
line-endings. Doing it in installer seems more reasonable, 'cos
otherwise problems with md5 checksums would come up.

[..]

--
Andrey Demenev aka Blindman
demenev@on-line.jar.ru
Lukas Smith

2004-06-13, 3:56 am

Andrey Demenev wrote:

> [..]
>
> Forcing people to use correct line-endings does not solve the problem.
> After CVS checkout on Windows, line-endings will be converted to CRLF,
> even if checked in files used CR. After issueing pear package, the
> tarball will contain files with "wrong" line-endings. I do think we need
> auto-conversion (either in packager or in installer), if we care about
> line-endings. Doing it in installer seems more reasonable, 'cos
> otherwise problems with md5 checksums would come up.


Err, are you sure of this?

regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com

Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin

Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
Andrey Demenev

2004-06-13, 8:55 am

Lukas Smith wrote:

> Andrey Demenev wrote:
>
>
>
> Err, are you sure of this?
>


Sure of what ? Platform-dependent newlines conversion ? Yes, that is true.

--
Andrey Demenev aka Blindman
demenev@on-line.jar.ru
Lukas Smith

2004-06-13, 8:55 am

Andrey Demenev wrote:

> Lukas Smith wrote:
>
>
> Sure of what ? Platform-dependent newlines conversion ? Yes, that is true.


Sure of the following:
"After CVS checkout on Windows, line-endings will be converted to CRLF,
even if checked in files used CR. After issueing pear package, the
tarball will contain files with "wrong" line-endings."

regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com

Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin

Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
Stefan Neufeind

2004-06-13, 8:55 am

On 13 Jun 2004 at 12:07, Andrey Demenev wrote:

> Lukas Smith wrote:
>
> [..]
> [..]
>
> Forcing people to use correct line-endings does not solve the problem.
> After CVS checkout on Windows, line-endings will be converted to CRLF,
> even if checked in files used CR. After issueing pear package, the
> tarball will contain files with "wrong" line-endings. I do think we need
> auto-conversion (either in packager or in installer), if we care about
> line-endings. Doing it in installer seems more reasonable, 'cos
> otherwise problems with md5 checksums would come up.


Couldn't this be done prior to checksum-calculation in the "pear
package"-step?

Stefan
Andrey Demenev

2004-06-13, 8:55 am

Lukas Smith wrote:

> Andrey Demenev wrote:
>
>
>
> Sure of the following:
> "After CVS checkout on Windows, line-endings will be converted to CRLF,
> even if checked in files used CR. After issueing pear package, the
> tarball will contain files with "wrong" line-endings."
>


Yes, I think that is obvious. What makes you doubt?

> regards,
> Lukas Smith
> smith@backendmedia.com
> _______________________________
>


--
Andrey Demenev aka Blindman
demenev@on-line.jar.ru
Lukas Smith

2004-06-13, 8:55 am

Andrey Demenev wrote:

>
> Yes, I think that is obvious. What makes you doubt?


The fact that I use unix line endings while developing in windows.
Wincvs doesnt add windows line endings and my editor can be set to save
using unix or windows line endings.

regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com

Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin

Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
Andrey Demenev

2004-06-13, 8:55 am

Lukas Smith wrote:
> Andrey Demenev wrote:
>
>
>
> The fact that I use unix line endings while developing in windows.
> Wincvs doesnt add windows line endings and my editor can be set to save
> using unix or windows line endings.
>


You are right, WinCVS is able to checkout with unix line endings, but
that is a specific (optional) feature of WinCVS. Standard CVS client
does converts line endings on checkout.

--
Andrey Demenev aka Blindman
demenev@on-line.jar.ru
Andrey Demenev

2004-06-13, 3:57 pm

Stefan Neufeind wrote:

>
>
> Couldn't this be done prior to checksum-calculation in the "pear
> package"-step?
>
> Stefan


Yes, it can be done there.

BTW, after looking closer to source of PEAR_Packager, I see there is a
typo that prevents writing of md5 checksums into package.xml [1]. Also,
if original package.xml was produced with md5 checksums, checksums don't
get updated in package.xml included into the tarball.

[1] http://pear.php.net/bugs/bug.php?id=1627

--
Andrey Demenev aka Blindman
demenev@on-line.jar.ru
Tomas V.V.Cox

2004-06-13, 3:57 pm

Helgi Žormar wrote:
>
>
> Indeed, that's what I use anyway ;P


It the one I use too, but I'm missing a lot a code browser (navigate
through classes/methods), hope they implement that some day.

Tomas V.V.Cox
Tobias Schlitt

2004-06-13, 3:57 pm

Tomas V.V.Cox wrote:

[color=darkred]
[color=darkred]
> It the one I use too, but I'm missing a lot a code browser (navigate
> through classes/methods), hope they implement that some day.


Ever tried Weaverslave? I'm a Not-Windoze-User, but what I saw of it was
great. (Don't know, if it has a code browser in particular.)

Regards,
Toby
--
Tobias Schlitt GPG Key: 0xA6529579
a passion for php http://www.schlitt.info
Daniel Convissor

2004-06-13, 3:57 pm

Hi Andrey:

On Sun, Jun 13, 2004 at 11:01:54PM +1100, Andrey Demenev wrote:
>
> You are right, WinCVS is able to checkout with unix line endings, but
> that is a specific (optional) feature of WinCVS. Standard CVS client
> does converts line endings on checkout.


With the "standard" being?

I use the CVS client that comes with cygwin, which, naturally, doesn't
convert the line endings.

I've never heard of a CVS client that converts line endings. FTP, sure.
That just wouldn't make any sense. If this was really a problem, I
suspect it would come up repeatedly on the dev list. Doing a search for
this in pear-dev shows this hasn't ever been discussed there before.

http://marc.theaimsgroup.com/?l=pea...line+ending&q=b

--Dan

--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
Daniel Convissor

2004-06-13, 3:57 pm

Hi Folks:

On Sat, Jun 12, 2004 at 09:47:25PM +1000, Aidan Lister wrote:
>
> I develop on windows, I've no idea how to convert my files to \n only.


For the record, it turns out Aidan and I use the same editor (EditPlus)
and I explained how the program can do file conversions.

See you,

--Dan

--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
Andrey Demenev

2004-06-14, 3:56 am

Daniel Convissor wrote:

> Hi Andrey:
>
> On Sun, Jun 13, 2004 at 11:01:54PM +1100, Andrey Demenev wrote:
>
>
>
> With the "standard" being?
>

With the "standard" being available from http://ccvs.cvshome.org/ .

> I use the CVS client that comes with cygwin, which, naturally, doesn't
> convert the line endings.
>
> I've never heard of a CVS client that converts line endings. FTP, sure.


Hmm.. Strange ... I am using that "standard" one on windows (in "native"
envorenment, not cygwin), and it always converts to CRLF. I use both
windows and linux to access same repositories, and I always note the
difference between line endings.

> That just wouldn't make any sense. If this was really a problem, I
> suspect it would come up repeatedly on the dev list. Doing a search for
> this in pear-dev shows this hasn't ever been discussed there before.
>
> http://marc.theaimsgroup.com/?l=pea...line+ending&q=b
>
> --Dan
>



--
Andrey Demenev aka Blindman
demenev@on-line.jar.ru
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com