[Top][All Lists]

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

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

From: Daniel Dickinson
Subject: Re: [Monotone-devel] Re: [PATCH] New lua command execute_redirout which executes an os command and captures standard output
Date: Fri, 18 Aug 2006 00:46:55 -0400

Hash: SHA1

On Tue, 15 Aug 2006 04:18:49 -0700
Nathaniel Smith <address@hidden> wrote:

> 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...

Is there autoconf magic we can use for this?  I know that configure
already checks for the existence of stat and some of its members, but
I'm not sure of the details.

> 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.)

In two or three weeks, if no one else gets a chance before me, I'm
thinking that I'll see what I can do with autoconf that will make use
of stat and readlink transparent (that is, no need, within monotone
proper, for different code for win32 vs. *nix) 

I still think that have execute_out could be useful for things like
POSIX acl's (which I am debating using) which are definitely platform
- -- 
GnuPG Key Fingerprint 86 F5 81 A5 D4 2E 1F 1C
And that's my crabbing done for the day.  Got it out of the way early, 
now I have the rest of the afternoon to sniff fragrant tea-roses or 
strangle cute bunnies or something.   -- Michael Devore
Version: GnuPG v1.4.1 (GNU/Linux)


reply via email to

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