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: Bruce Stephens
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 10:22:02 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Timothy  Brownawell <address@hidden> writes:

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

Not sure I see that much difference between someone writing an
extension which allows them to execute arbitrary programs and using
that in a hook to execute /usr/bin/stat (on those operating systems
that provide such a program), and writing an extension which provides
some kind of stat information more directly, but providing variable
information depending on what the platform offers.

I guess arguably if monotone just offered an "execute this program"
extension, then monotone itself stays platform-neutral in that
respect.

On the whole I'd have thought it would likely be useful for hooks to
have access to information about files, and I'd have thought providing
that directly would be best, even if it varies a bit between
platforms.  That makes life trickier for hook writers, but that seems
inevitable.




reply via email to

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