You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bruce DeVisser <bm...@look.ca> on 2003/07/16 23:20:41 UTC

Issue: Extra log CRs under Windows

Put simply: 'svn log' under Windows ends most lines with
CR-CR-LF.

(Apologies if there are any inaccuracies... I'm doing this
by recollection from the installation at work, and writing
this now before I forget all about it again.)

Log entries are typically created using an editor, and are
saved in the same file format as the basic text supplied by
svn (which I believe to be CR-LF).

Log retrieval results in true log lines with CR-CR-LF, and
the meta-log-data ending in CR-LF.

I am using svn 0.25.0, though this issue has existed for a
while. This is with a local repository. Windows 2000 box,
running commands from a zsh (shell) window -- but I suspect
a DOS box does the same thing.

Bruce


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by Tobias Ringstrom <to...@ringstrom.mine.nu>.
Tobias Ringstrom wrote:
> Actually most users of svn_subst_detranslate_string uses printf, so I 
> think the right solution is to remove the EOL translation from it. That 
> would also make translate/detranslate each others inverse.

Please forget that incorrect statement.  They are each others reverse as 
it is. I see a few alternatives solution:

1. Use APR instead of printf in the cmdline client.
2. Change svn_subst_detranslate_string to not perform EOL changes.
3. Add a flag to svn_subst_detranslate_string to enable/disable EOL
    changes.

What do you think?

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by Tobias Ringström <to...@ringstrom.mine.nu>.
C. Michael Pilato wrote:
> 
> I'm not convinced that that would be a correct change.  Seems like it
> would be more accurate to use a binary output stream instead of going
> through printf() for those places that are printing multi-lined,
> detranslated strings.

Fixed in rev 7513.

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by "C. Michael Pilato" <cm...@collab.net>.
Tobias Ringstrom <to...@ringstrom.mine.nu> writes:

> Masaru Tsuchiyama wrote:
> >>>>Put simply: 'svn log' under Windows ends most lines with
> >>>>CR-CR-LF.
> 
> I did some investigation, and the reason is that log_message_receiver
> insubversion/clients/cmdline/log-cmd.c uses printf to print a string
> that already has been translated by svn_subst_detranslate_string to
> use CR-NL.  When printf prints that string, the NL will be translated
> to CR-NL again, and you get CR-CR-NL.
> 
> Actually most users of svn_subst_detranslate_string uses printf, so I
> think the right solution is to remove the EOL translation from
> it. That would also make translate/detranslate each others inverse.
> 
> Unless someone complains, I'll perform that change.

I'm not convinced that that would be a correct change.  Seems like it
would be more accurate to use a binary output stream instead of going
through printf() for those places that are printing multi-lined,
detranslated strings.  Also, svn_subst_detranslate_string() doesn't
repair the line-endings in (and will throw an error on) a
mixed-line-ending string.  Removing this behavior and using printf()
will simply mask what might be an interesting problem with the string.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by Tobias Ringstrom <to...@ringstrom.mine.nu>.
Masaru Tsuchiyama wrote:
>>>>Put simply: 'svn log' under Windows ends most lines with
>>>>CR-CR-LF.

I did some investigation, and the reason is that log_message_receiver 
insubversion/clients/cmdline/log-cmd.c uses printf to print a string 
that already has been translated by svn_subst_detranslate_string to use 
CR-NL.  When printf prints that string, the NL will be translated to 
CR-NL again, and you get CR-CR-NL.

Actually most users of svn_subst_detranslate_string uses printf, so I 
think the right solution is to remove the EOL translation from it. That 
would also make translate/detranslate each others inverse.

Unless someone complains, I'll perform that change.

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by Masaru Tsuchiyama <ts...@asahi-net.email.ne.jp>.
> On Thu, Jul 17, 2003 at 09:02:06AM -0500, Ben Collins-Sussman wrote:
> > Bruce DeVisser <bm...@look.ca> writes:
> > 
> > > Put simply: 'svn log' under Windows ends most lines with
> > > CR-CR-LF.
> > >
> > > Log entries are typically created using an editor, and are
> > > saved in the same file format as the basic text supplied by
> > > svn (which I believe to be CR-LF).
> > > 
> > > Log retrieval results in true log lines with CR-CR-LF, and
> > > the meta-log-data ending in CR-LF.
> > 
I met same situation.

Server(WebDAV)
   Redhat Linux9, apache 2.0.47
   subversion 0.32.1 (dev build, r7511)
Client
   Windows 2000
   subvesion 0.30.0 (r7511)

'svn log' under Linux ends with LF.
But 'svn log' under Windows ends with CR-CR-LF.

Masaru Tsuchiyama



> On Thu, Jul 17, 2003 at 09:02:06AM -0500, Ben Collins-Sussman wrote:
> > Bruce DeVisser <bm...@look.ca> writes:
> > 
> > > Put simply: 'svn log' under Windows ends most lines with
> > > CR-CR-LF.
> > >
> > > Log entries are typically created using an editor, and are
> > > saved in the same file format as the basic text supplied by
> > > svn (which I believe to be CR-LF).
> > > 
> > > Log retrieval results in true log lines with CR-CR-LF, and
> > > the meta-log-data ending in CR-LF.
> > 
> > I'm perplexed:  I could swear that we had this bug once,
> > and we *fixed* it.  We actually wrote code to force all
> > log messages into {UTF8, LF} in the repository and convert
> > them back into {native locale, native eol} when the client
> > fetches them for display.
> 
> I don't know anything about that; but I can also report that
> 0.25 also munges conflicted files similarly during 'svn
> merge'. I don't see an open issue on this matter in IZ.
> 
> 
> > Am I crazy?
> 
> I hope not answering this won't prevent the issue from being
> entered/fixed! (If it hasn't been [re]fixed already, that is.)
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by Bruce DeVisser <de...@look.ca>.
On Thu, Jul 17, 2003 at 09:02:06AM -0500, Ben Collins-Sussman wrote:
> Bruce DeVisser <bm...@look.ca> writes:
> 
> > Put simply: 'svn log' under Windows ends most lines with
> > CR-CR-LF.
> >
> > Log entries are typically created using an editor, and are
> > saved in the same file format as the basic text supplied by
> > svn (which I believe to be CR-LF).
> > 
> > Log retrieval results in true log lines with CR-CR-LF, and
> > the meta-log-data ending in CR-LF.
> 
> I'm perplexed:  I could swear that we had this bug once,
> and we *fixed* it.  We actually wrote code to force all
> log messages into {UTF8, LF} in the repository and convert
> them back into {native locale, native eol} when the client
> fetches them for display.

I don't know anything about that; but I can also report that
0.25 also munges conflicted files similarly during 'svn
merge'. I don't see an open issue on this matter in IZ.


> Am I crazy?

I hope not answering this won't prevent the issue from being
entered/fixed! (If it hasn't been [re]fixed already, that is.)

Bruce

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue: Extra log CRs under Windows

Posted by Ben Collins-Sussman <su...@collab.net>.
Bruce DeVisser <bm...@look.ca> writes:

> Put simply: 'svn log' under Windows ends most lines with
> CR-CR-LF.
>
> Log entries are typically created using an editor, and are
> saved in the same file format as the basic text supplied by
> svn (which I believe to be CR-LF).
> 
> Log retrieval results in true log lines with CR-CR-LF, and
> the meta-log-data ending in CR-LF.

I'm perplexed:  I could swear that we had this bug once, and we
*fixed* it.  We actually wrote code to force all log messages into
{UTF8, LF} in the repository and convert them back into {native
locale, native eol} when the client fetches them for display.

Am I crazy?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org