|
From: | Markus Schiltknecht |
Subject: | Re: [Monotone-devel] encapsulation branch |
Date: | Fri, 20 Apr 2007 09:39:42 +0200 |
User-agent: | Icedove 1.5.0.10 (X11/20070329) |
Hi, Thomas Keller wrote:
I like the idea. One question though: if we look at certain system entities, like a database or a workspace as single entities, and no longer in terms of a global, single "app_state" object, would it be possible (in general) to make these exchangable easily? What I was thinking of here is automate stdio, which, once started, runs on exactly one single database / workspace, and this is determined during initialization. The basic problems here are
Well, automate stdio is the only command I can think of which could make use of such a feature. IMO, it's better to check for everything that's needed right from the start of the automate command. And let users simply start multiple mtn processes if they need to 'change'. Why define extra automate commands to switch databases if you can do it in your shell ;-)
Regarding the deferred failures: maybe we need to add options like '--read-only-db' or '--no-workspace' to automate stdio and make it check right from the start. So if a 'mtn -d test.db --read-only-db automate stdio' starts up correctly, you can be sure to be successfully connected to a read-only database.
Maybe we can spice it up further, by some auto detection stuff, i.e. telling the user if a workspace could be found or not. But OTOH, such automatisms are more of a foot-gun than explicit options are.
As a side note: there's no meaning in having chosen the AUTOMATE commands first. I plan to do something similar to all CMDs, i.e. limit them to their contexts. And make the compiler enforce that limitation.
Regards Markus
[Prev in Thread] | Current Thread | [Next in Thread] |