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. _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel