monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: line endings with 0.31


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: line endings with 0.31
Date: Mon, 20 Nov 2006 21:08:40 -0800
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, Nov 20, 2006 at 11:31:02AM -0800, Graydon Hoare wrote:
> Nathaniel Smith wrote:
> 
> >The get_linesep_conv hook is passed the filename, it can do whatever
> >it likes with it.  E.g.,
> >  function get_linesep_conv(filename)
> >    if regex.search("\\.jpe?g$", filename) then
> >      return {"LF", "LF"}
> >    end
> >    return {"LF", "CRLF"}
> >  end
> 
> Woah! Did we really leave it like this? That's terrible.

Yeah, there's a bunch of design work in the archives, but no-one's
stepped up to work on it.

> We added an 
> attribute to files called mtn:manual_merge that controls whether the 
> merger believes it can do line-merging on the file or whether the file 
> should be treated as binary. Can't we assume that mtn:manual_merge 
> implies "don't do the linesep / charset conversion on i/o"? Or can we 
> rephrase the attribute as mtn:blob, or such? Users should not have to 
> muck about with this linesep conversion function stuff, if possible.

Attrs are definitely the right way to do this, but I'm not sure about
using mtn:manual_merge.  The history there was that someone needed the
manual merge thing, and a "binary" attr was proposed.  Discussion on
the list then bogged down as it turned out that "binary" is a horribly
overloaded term with lots of possible meanings and some of them
perhaps bad to conflate, so rather than try to solve the whole problem
we just added manual_merge and figured we'd work the other ones out
later.

Some of the things "binary" might mean:
  -- shouldn't use the built-in line merger
  -- shouldn't do line-ending translation
  -- shouldn't do charset translation
  -- should suppress output from "diff"
  -- shouldn't do $$-style keyword expansion
  -- should use mime type application/octet-stream in viewmtn and
     friends
...I'm probably forgetting some.

I also wonder whether output mangling things should be default-on or
default-off.  There is a part of me that feels like line-ending
conversion should be _enabled_ by an attr, rather than _disabled_?

-- Nathaniel

-- 
"But suppose I am not willing to claim that.  For in fact pianos
are heavy, and very few persons can carry a piano all by themselves."




reply via email to

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