FWIW...

This is usually caused by manually copying files from a DOS/Windows
machine to a Unix machine and then checking them in.  However it
is caused, it happens when you check a DOS-formatted file in from a
Unix machine.  In this case, CVS stores the file as-is with \r\n's
intact.  If checked in from a DOS/Win machine, CVS would automatically
convert the \r\n's to \n's which it uses internally.

So, if you attempt to check out the file with \r\n's from a Win/DOS
machine, CVS will add an extra \r when converting the \n's to \r\n's.
So each line will now end with a \r\r\n.  Improperly "fixing" this
double-line situation is usually what causes the file to be checked 
back in with only \r's.

Moral of the story: don't check-in DOS formatted files from a Unix
formatted system unless they are marked as binary.  And if you do
check them in by accident, be careful how you fix it. ;)

-Paul

"David M. Karr" wrote:
> 
> When I view the file "src/share/org/apache/struts/util/AppException.java" in
> Cygwin/XEmacs (binmode), it shows up as a SINGLE line (the entire file), with
> linefeeds ("\r" in "od") instead of newlines.  I see just about the same in
> "vi".  I noticed David G. made some formatting changes in this file a couple of
> weeks ago.  Apparently every other line was a blank line, for some reason?
> The blank lines appeared when Rob Leland made some minor changes about 7 weeks
> ago.  In my copy, if I just replace the "^M"s (what shows in XEmacs) with a
> newline, the file looks fine, and the "od" output shows normal newlines (just
> like other files).
> 
> I also notice that in "src/share/org/apache/struts/validator",
> "ValidatorForm.java" and "DynaValidatorForm.java" are in the same state.
> 
> These are noticeable because the build reports javadoc warnings on these files
> (and some others which I'm still trying to figure out).
> 
> Looking at these errors also points out the "-breakiterator" option to javadoc,
> which is new to me.  Apparently this causes it to use a more intelligent
> algorithm for determining the end of a sentence (although it's apparently the
> default in JDK 1.4).  Apparently there are several examples of "i.e." in Struts
> javadoc that causes a truncated string in the generated javadoc.
> Unfortunately, I don't see any way to provide this option to the "javadoc" task
> in Ant, so I can at least (easily) see what it does.
> 
> --
> ===================================================================
> David M. Karr          ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]   ; SCJP
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to