-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 15 Aug 2006 04:18:49 -0700 Nathaniel Smith <[EMAIL PROTECTED]> 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 dependent. - -- GnuPG Key Fingerprint 86 F5 81 A5 D4 2E 1F 1C http://gnupg.org 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFE5UZLhvWBpdQuHxwRAvhIAJ4jXXexzJ37L6e1RIPPv8oOj1+pvgCfTjSO IGu9rfv/3PdYcasjClLIzko= =OY9n -----END PGP SIGNATURE-----
_______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
