Thomas Keller <m...@thomaskeller.biz> writes: > Maybe we could make it easier to "extract", or better "move" an > internalized database to an external place and vice versa, so people > don't have to mess with _MTN/options by hand? Then maybe > $HOME/.monotone/databases/<user-chosen-name>.mtn is a good default, > similar to what Stephen proposed. We could add more management features > there, f.e. a "list databases" command which lists available known > databases, a way to find a database only by its name (ie. -d foo would > look for and find $HOME/.monotone/databases/foo.mtn), we could "connect" > databases and workspaces by adding known workspaces of a database as db > variables and list those as well in the database list. There could be a > hook "get_default_database_location" which could be altered by the user > to a different path than the default one underknees $HOME, stuff like that.
This sounds good. That way, if I forget where I checked out something, the database can tell me. The 'get_default_database_location' hook should return a list of directories; {"~/.monotone/databases", "/usr/share/monotone/databases"} would be a good default on Unix, {"$APPDATA/monotone/databases", "$ALLUSERSPROFILE/Application Data/monotone/databases"} on Windows. It might be good to have a MTN_DATABASE_PATH environment variable as well; everything else with a search path uses that mechanism. That could be added by the user in the the 'get_default_database_location' hook, but it would be better to have a standard name. Perhaps the default hook definition could handle that env variable. -- -- Stephe _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel