monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: [PATCH] New lua command execute_redirout which


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: [PATCH] New lua command execute_redirout which executes an os command and captures standard output
Date: Tue, 15 Aug 2006 04:18:49 -0700
User-agent: Mutt/1.5.12-2006-07-14

On Mon, Aug 14, 2006 at 06:57:57PM -0500, Timothy Brownawell wrote:
> On Mon, 2006-08-14 at 16:19 -0700, Graydon Hoare wrote:
> > Bruce Stephens wrote:
> > 
> > > Well, an obvious alternative would be to provide those two operations
> > > as lua functions.  How portable is stat as a command?
> > 
> > Yes, I'd much prefer writing stat() and readlink() lua functions. Both 
> > functions are in SUSv3 and will be much faster than spawning a subprocess.
> 
> Won't these be somewhat non-portable, such as to windows? I thought
> monotone proper (as opposed to, say, extensions you can put in
> monotonerc) was supposed to be the same on all platforms, are we
> loosening that?

Inasmuch as we have an official position, it seems to be "when in
Rome...".  Cf. restrictions on legal file names, home directory
support, SIGPIPE, and especially mtn:execute/make_executable()...

I guess stat() is an odd duck; it does make _sense_ on both platforms.
Depends on what we want to do with it...

readlink() is very easy to implement correctly on windows, though --
possibly in 0 lines of code :-).  (Assuming we don't want to get into
NTSF esoterica that nobody ever, ever uses.)

-- Nathaniel

-- 
"Lull'd in the countless chambers of the brain,
Our thoughts are link'd by many a hidden chain:
Awake but one, and lo! what myriads rise!
Each stamps its image as the other flies"
  -- Ann Ward Radcliffe, The Mysteries of Udolpho

This email may be read aloud.




reply via email to

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