monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Question for Windows automate users


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Question for Windows automate users
Date: Sun, 22 Feb 2009 00:32:55 +0000

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?

-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

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