Timothy Brownawell <[EMAIL PROTECTED]> 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. _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
