# # patch "ChangeLog" # from [f0ef1efea7f4cba22c4db39df94715fc939205d8] # to [32523bb19d8135f8a5db6a8bcbe85087179bab4b] # # patch "app_state.cc" # from [b821fb66100e7626444a2f1e4bc2af4d572880b1] # to [715d0beb6780ce3ea77b0934ceb4f5a4fbc0293b] # # patch "lua.cc" # from [37f91418b85e4c296e2da82d45f4eaa7c6513aed] # to [4e29481967fff85b5399cc318e535b48ec4f553a] # # patch "monotone.cc" # from [daff288cbe075dc65c3dfd45e89ea3e71d438ed8] # to [7b86d611ebb4f89b6fb733b5e322bd500302d020] # # patch "monotone.texi" # from [beb10855718e7f99b7f666defd1ab2de5e5e81dd] # to [17d9d41221abe7bbbca4c217ba37d32dc44e3fbe] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,16 @@ 2005-04-19 Matthew Gregan + * lua.cc (default_rcfilename): Use ~/.monotone/monotonerc. This + change is to prepare for the upcoming support for storing user + keys outside of the database (in ~/.monotone/keys/). + * app_state.cc (load_rcfiles): Refer to new rc file location in + comments. + * monotone.cc (options): Refer to new rc file location. + * monotone.texi: Refer to new rc file location. Also change bare + references to the rc file from '.monotonerc' to 'monotonerc'. + +2005-04-19 Matthew Gregan + * commands.cc (log): 'depth' option did not handle the single file case correctly. Also a couple of minor cleanups. * tests/t_log_depth_single.at: New test. --- app_state.cc +++ app_state.cc @@ -316,9 +316,9 @@ extra_rcfiles.push_back(filename); } -// rc files are loaded after we've changed to the working copy -// directory so that MT/monotonerc can be loaded between .monotonerc -// and other rcfiles +// rc files are loaded after we've changed to the working copy directory so +// that MT/monotonerc can be loaded between ~/.monotone/monotonerc and other +// rcfiles void app_state::load_rcfiles() @@ -328,7 +328,7 @@ if (stdhooks) lua.add_std_hooks(); - // ~/.monotonerc overrides that, and + // ~/.monotone/monotonerc overrides that, and // MT/monotonerc overrides *that* if (rcfiles) --- lua.cc +++ lua.cc @@ -506,7 +506,7 @@ void lua_hooks::default_rcfilename(fs::path & file) { - file = mkpath(get_homedir()) / mkpath(".monotonerc"); + file = mkpath(get_homedir()) / mkpath(".monotone/monotonerc"); } void --- monotone.cc +++ monotone.cc @@ -62,7 +62,7 @@ {"quiet", 0, POPT_ARG_NONE, NULL, OPT_QUIET, "suppress log and progress messages", NULL}, {"help", 0, POPT_ARG_NONE, NULL, OPT_HELP, "display help message", NULL}, {"nostd", 0, POPT_ARG_NONE, NULL, OPT_NOSTD, "do not load standard lua hooks", NULL}, - {"norc", 0, POPT_ARG_NONE, NULL, OPT_NORC, "do not load ~/.monotonerc or MT/monotonerc lua files", NULL}, + {"norc", 0, POPT_ARG_NONE, NULL, OPT_NORC, "do not load ~/.monotone/monotonerc or MT/monotonerc lua files", NULL}, {"rcfile", 0, POPT_ARG_STRING, &argstr, OPT_RCFILE, "load extra rc file", NULL}, {"key", 'k', POPT_ARG_STRING, &argstr, OPT_KEY_NAME, "set key for signatures", NULL}, {"db", 'd', POPT_ARG_STRING, &argstr, OPT_DB_NAME, "set name of database", NULL}, --- monotone.texi +++ monotone.texi @@ -1199,13 +1199,14 @@ been successfully generated and stored. On subsequent commands, Jim will need to re-enter our passphrase in order to perform security-sensitive tasks. To simplify matters, Jim decides to store -his security passphrase in his @code{.monotonerc} file, by writing a +his security passphrase in his @code{monotonerc} file, by writing a @emph{hook function} which returns the passphrase, so that he does not need to repeatedly be prompted for it: @smallexample @group -$ cat >>~/.monotonerc +$ mkdir ~/.monotone +$ cat >>~/.monotone/monotonerc function get_passphrase(keypair_id) return "jimsekret" end @@ -1626,11 +1627,11 @@ Now Jim's monotone is able to identify Beth and Abe, and he is ready to give them permission to access his database. He does this by adding a -small amount of extra information to his @file{.monotonerc} file: +small amount of extra information to his @file{monotonerc} file: @smallexample @group -$ cat >>~/.monotonerc +$ cat >>~/.monotone/monotonerc function get_netsync_read_permitted (collection, identity) if (identity == "abe@@juicebot.co.jp") then return true end if (identity == "beth@@juicebot.co.jp") then return true end @@ -4498,10 +4499,10 @@ execute it. This way you can modify how monotone behaves. You can put new definitions for any of these hook functions in a file address@hidden/.monotonerc}, or in your working copy in address@hidden/.monotone/monotonerc}, or in your working copy in @file{MT/monotonerc}, both of which will be read every time monotone runs. Definitions in @file{MT/monotonerc} shadow (override) -definitions made in your @file{$HOME/.monotonerc}. You can also tell +definitions made in your @file{$HOME/.monotone/monotonerc}. You can also tell monotone to interpret extra hook functions from any other @var{file} using the @address@hidden option; hooks defined in files specified on the command-line will shadow hooks from the the automatic @@ -6003,7 +6004,8 @@ @comment TROFF INPUT: .TP @item @b{--norc} -Do not load Lua hooks from user's @b{~/.monotonerc} file. +Do not load Lua hooks from user's @b{~/.monotone/monotonerc} or the +working copy's @b{MT/monotonerc} file. @comment TROFF INPUT: .TP @item @address@hidden} @@ -6102,7 +6104,7 @@ @c --------------------------------------------------------------------- @table @code address@hidden @b{$HOME/.monotonerc} address@hidden @b{$HOME/.monotone/monotonerc} A Lua script, used as a customization file. @comment TROFF INPUT: .SH NOTES @@ -6118,7 +6120,7 @@ @comment TROFF INPUT: .IP \(bu Command line options override environment variables and -settings in Lua scripts (such as @b{.monotonerc}) +settings in Lua scripts (such as @b{monotonerc}) @comment TROFF INPUT: .SH "SEE ALSO"