monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] monotone win32 crlf questions


From: Derek Scherger
Subject: Re: [Monotone-devel] monotone win32 crlf questions
Date: Tue, 13 Jul 2004 21:14:52 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040602

Derek Scherger wrote:

Probably user/configuration error more than a monotone bug.

I finally had some time to play around with this and it seems that it might not be user error after all. ;)

By default, these are both _disabled_; if you want Monotone to munge
around with your files, you have to ask it to explicitly, by defining
the get_charset_conv or get_linesep_conv hooks.  Monotone prefers to
store text in LF (= "\n") format, so in this case it sounds like you
might want to add on all your Windows boxen something like:
  function get_linesep_conv(name)
    -- Examples for leaving binary files untouched:
    if (string.find(name, "%.jpg")) then return {"LF", "LF"} end
    if (string.find(name, "%.png")) then return {"LF", "LF"} end
    return {"LF", "CRLF"}
  end

I tried all 4 variations on this hook (LF/LF, LF/CRLF, CRLF/LF and CRLF/CRLF) and none of them improved the situation. Some did make it worse though. Worse being that there were even more extraneous blank lines (CRLF sequenes) in the diff output.

I also tried the different variations with an empty database and that didn't help either. It seems that diff must be ignoring the different line endings and treating both \r and \n as valid line. Both seem to get converted to either \r\n or \r\n\r\n depending on what the hook returns.

--
Cheers,
Derek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]