[darcs-users] Re: Can I disable \xx quoting in record --interactive?

Albert Reiner areiner at tph.tuwien.ac.at
Tue Mar 22 18:32:56 UTC 2005


[Tommy Pettersson <ptp at lysator.liu.se>, Tue, 22 Mar 2005 19:10:31 +0100]:
> That's why I (in the long run) want to move the encoding part
> out of darcs.  There was a discussion about how to handle
> different line endings in darcs, and one suggestion (that I
> think got fairly accepted) was to (optionally) convert to and
> from a given type of EOL whenever darcs reads and writes the
> working files.  If darcs was made UTF8 aware the same method
> could be used to convert (with an external tool like iconv)
> from a local encoding to UTF8, used internally in darcs, and
> back to local encoding again when writing.  The conversions
> would need to affect all input and output, both to files and
> to the terminal.  If it was implemented as a general filter
> it could probably do other interesting things as well.

The nice thing with that approach would seem to be that one might then
use pretty printers as filters: e.g., 

    (let (foo (bar)) foo)

and

    (let (foo (bar))
        foo)

really are the same (except in a string constant, of course) and
should not be patch-worthy; the pretty printers presumably know enough
about the language to know what is safe and what isn't.  And while the
pretty printer for converting into internal form would have to be
under version control, it would be natural to allow different
developers to specify another set of pretty printers to be run during
checkout.

It just seems that this might easily get quite expensive as you would
have to apply the filter for any operation involving the working copy.

Albert.





More information about the darcs-users mailing list