monotone-commits-diffs
[Top][All Lists]
Advanced

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

[Monotone-commits-diffs] Revision 5ef5b456e6d0ec4836053557f969fd90972404


From: monotone
Subject: [Monotone-commits-diffs] Revision 5ef5b456e6d0ec4836053557f969fd9097240475
Date: Tue, 18 May 2010 00:40:44 +0200

-----------------------------------------------------------------
Revision: 5ef5b456e6d0ec4836053557f969fd9097240475
Ancestor: fe374049603f044d8796c2b1d5ed7f17b90801bc
Author: address@hidden
Date: 05/18/10 00:36:44
Branch: net.venge.monotone.experiment.database-management

Modified files:
        app_state.cc app_state.hh cmd_db.cc cmd_list.cc database.cc
        database.hh key_store.cc lazy_rng.hh migrate_ancestry.cc
        network/session.cc options_list.hh work.cc work.hh

ChangeLog: 

* lazy_rng.hh/cc: make the rng generator a true singleton with a static 
accessor, so we don't have to pass an instance of the generator around 
everywhere 
* app_state.hh/cc: remove conditional lazy_rng instance from app_state; move 
the database_cache from app_state to
* database.hh/cc: ...here where it logically belongs and add a static accessor 
reset_cache() to remove all cached db instances
* cmd_db.cc: ...which is used here in db migrate
* cmd_list.cc: new command list databases which looks for managed databases in 
all configured locations and outputs their aliases and registered workspaces
* options_list.hh: save a given database alias (= managed db) in an extra 
option variable which prevents the stupid string operations we previously 
needed to get the alias from an expanded system_path
* database.cc: rename resolve_managed_path to resolve_db_alias, give the alias 
as extra parameter
* database.cc: new constructor which only takes a lua_hooks instance and a 
options instance (look ma, no app_state!) - factor out the common 
initialization code between both, the new and the legacy constructor in a new 
init() function
* database.cc, keys.cc, ...: change calls to the previously passed 
app_state::rng pointer to lazy_rng::get()
* work.cc: change read_options_file and write_options_file to accept an options 
instance instead of a hardcoded list of workspace parameters, try to handle 
database aliases properly there (still lacks many tests of course)
* work.hh/cc: change get_database_option to get_options and accept an options 
instance, so every option, not just the database path, can be queried (needed 
for list databases)
* work.cc: add code to workspace::set_options to notice database changes in a 
workspace. Check the known-workspaces variable of the old database and remove 
the current workspace from it; likewise add the workspace to the newly set 
database if its not already set in the variable. This currently does not work 
because mtn makes it extraordinarily hard to retrieve the system_path of the 
current workspace f.e. for setup (system_path p(".") does _not_ mean the 
current workspace...)


Attachment: txtI75U5VkZhj.txt
Description: Diff [fe374049603f044d8796c2b1d5ed7f17b90801bc] -> [5ef5b456e6d0ec4836053557f969fd9097240475]


reply via email to

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