monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] RFC: Restricting app_state to commands


From: Markus Schiltknecht
Subject: Re: [Monotone-devel] RFC: Restricting app_state to commands
Date: Mon, 09 Apr 2007 12:09:37 +0200
User-agent: Icedove 1.5.0.10 (X11/20070329)

Hi,

I wrote:
Anyway, I would also really like to get a better separation. I have started with (partly) ripping out the database from app_state and passing only that where possible.

Probably we can combine app.signers, app.verifiers and the key_store?

Maybe combine certain options and lua hooks with the appropriate objects (workspace, database, key_store and project), where they are used?

I've taken this idea somewhat further in the branch n.v.m.experimental.encapsulation. There's a README.encapsulation. I've ripped out the app_state from some functions which only need the database or only need the key_store. And I've commented what other app.opts, app.lua.hooks... etc.. a function would need to be able to remove the app_state.

I'm thinking about combining the appropriate lua hooks and options into specific contexts, i.e. a database context and a workspace context. AFAICT, that's the most obvious split point:

 - commands which only need the database
 - commands which only need the workspace
 - commands which need both.

Splitting the app_state into these two context states, we could achieve better encapsulation - and could probably work towards splitting the database context into a read-only-database and a writable-database context.

Comments?

Markus





reply via email to

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