[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Question for Windows automate users
From: |
Stephen Leake |
Subject: |
Re: [Monotone-devel] Question for Windows automate users |
Date: |
Sun, 22 Feb 2009 09:00:47 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Timothy Brownawell <address@hidden> writes:
> On Sun, 2009-02-15 at 10:27 -0800, Zack Weinberg wrote:
>> What's the intended effect of the make_io_binary() call in
>> automate::exec()? It looks like we're setting stdin and stdout to
>> binary mode for any automate operation, but that doesn't seem right --
>> if you're just running one automate command inside a batch file or
>> something you'd want DOS line endings, wouldn't you?
>
> get_file / get_file_of and put_file need to be binary-safe, so they work
> with binary files. stdio needs to be binary-safe, so the byte counts
> don't get messed up.
>
> The others probably don't care, but making them not binary (1) would be
> inconsistent, and (2) would mean that they'd give slightly different
> output when run through stdio. Not sure how much these points actually
> matter, especially for the commands that generate lists (tags,
> ancestors, inventory) rather than dumping items (get_current_revision).
>
> Perhaps default to binary for stdio and maybe get_file(_of)/put_file (or
> maybe not, since most files will probably be text files) and text for
> the others, with a --binary={yes|no} option to override this?
I always use editors that can deal with different line ending
conventions, so I'll never notice the difference. But it does seem
like giving the user control is a good idea.
Writing a convincing test for this will be complicated; you'll have to use
"if ostype = 'Windows'", rather than "canonicalize".
--
-- Stephe