# # # patch "ChangeLog" # from [d43c7628591e6e58648dabbf297fec922fd99436] # to [5aa53aee8a9fafc82dc38be2be0e6b716fb94ed8] # # patch "commands.cc" # from [fd8000cbe01cd09fbaa804c823e5b73339eb766f] # to [5dbabb79ad5b349e82e485d4abb470a57d400fcd] # # patch "file_io.cc" # from [3ca8050b61b62ef9010b0ebfda755a0af9269104] # to [547bf6f195554fd36499a1cfc95c1f571c2304b3] # # patch "file_io.hh" # from [362691f10f63d93e7cf83f299fe5aa0b4dcbee17] # to [0757908d747cc57398930b69141588544a5af775] # # patch "monotone.cc" # from [32e0dec22f6beac4ab8271c51ff29cd7caefb5a3] # to [af5584575bd8cf33478f05f3d584e74badce7e34] # # patch "paths.hh" # from [e81d1f0e7efdbff539b8b92f04ad357770130fd4] # to [efc61a747969595d633387c4e3bb0705b7cd4a10] # # patch "restrictions.cc" # from [543a6747d29e43971e5499b002e7e5975cac596a] # to [4ab5354b84577d7fb51608719cce00c243e98f39] # # patch "roster_merge.cc" # from [d1d307d2cc0fac8f4c50963b1563edcc3df26d86] # to [6c1dd37b6bd8f6a47682513cff002e50a2cd4ef7] # # patch "roster_merge.hh" # from [3a86138ac40adb1f2736fc9f348988b91aea2ff4] # to [695a1b81c873f9a264c10a7548eeb4a0ac1bf16b] # # patch "work.cc" # from [4304e5c44e5ecfdbcd352c6f1a7367324fa6d7ec] # to [bfd7914f0d53946522d25eee32d250ab8c1d4e42] # # patch "work.hh" # from [60f47948673a128ebc9c533ace6cda4b2d027a51] # to [a33e8cce902fd92de5574360525a37747a680e0a] # ============================================================ --- ChangeLog d43c7628591e6e58648dabbf297fec922fd99436 +++ ChangeLog 5aa53aee8a9fafc82dc38be2be0e6b716fb94ed8 @@ -1,5 +1,11 @@ 2006-03-28 Nathaniel Smith + * commands.cc (CMD_NO_MT): Rename to... + (CMD_NO_WORKSPACE): ...this. + * *.cc, *.hh: s/MT/_MTN/ (mostly in comments). + +2006-03-28 Nathaniel Smith + * commands.cc (get_log_message_interactively): * std_hooks.lua (edit_comment): s/MT:/MTN:/ ============================================================ --- commands.cc fd8000cbe01cd09fbaa804c823e5b73339eb766f +++ commands.cc 5dbabb79ad5b349e82e485d4abb470a57d400fcd @@ -251,7 +251,7 @@ { L(FL("executing command '%s'\n") % cmd); - // at this point we process the data from MT/options if + // at this point we process the data from _MTN/options if // the command needs it. if (cmds[cmd]->use_workspace_options) app.process_options(); @@ -293,7 +293,9 @@ void cmd_ ## C::exec(app_state & app, \ vector const & args) \ -#define CMD_NO_MT(C, group, params, desc, opts) \ +// use this for commands that should specifically _not_ look for an _MTN dir +// and load options from it +#define CMD_NO_WORKSPACE(C, group, params, desc, opts) \ struct cmd_ ## C : public command \ { \ cmd_ ## C() : command(#C, group, params, desc, false, \ @@ -2109,9 +2111,9 @@ include_pattern, exclude_pattern, app); } -CMD_NO_MT(serve, N_("network"), N_("PATTERN ..."), - N_("serve the branches specified by PATTERNs to connecting clients"), - OPT_BIND % OPT_PIDFILE % OPT_EXCLUDE) +CMD_NO_WORKSPACE(serve, N_("network"), N_("PATTERN ..."), + N_("serve the branches specified by PATTERNs to connecting clients"), + OPT_BIND % OPT_PIDFILE % OPT_EXCLUDE) { if (args.size() < 1) throw usage(name); @@ -2367,26 +2369,26 @@ process_commit_message_args(log_message_given, log_message, app); N(!(log_message_given && has_contents_user_log()), - F("MT/log is non-empty and log message was specified on command line\n" - "perhaps move or delete MT/log,\n" + F("_MTN/log is non-empty and log message was specified on command line\n" + "perhaps move or delete _MTN/log,\n" "or remove --message/--message-file from the command line?")); if (!log_message_given) { - // this call handles MT/log + // this call handles _MTN/log get_log_message_interactively(rs, app, log_message); // we only check for empty log messages when the user entered them // interactively. Consensus was that if someone wanted to explicitly // type --message="", then there wasn't any reason to stop them. N(log_message.find_first_not_of(" \r\t\n") != string::npos, F("empty log message; commit canceled")); - // we save interactively entered log messages to MT/log, so if something - // goes wrong, the next commit will pop up their old log message by - // default. we only do this for interactively entered messages, because - // otherwise 'monotone commit -mfoo' giving an error, means that after - // you correct that error and hit up-arrow to try again, you get an - // "MT/log non-empty and message given on command line" error... which - // is annoying. + // we save interactively entered log messages to _MTN/log, so if + // something goes wrong, the next commit will pop up their old log + // message by default. we only do this for interactively entered + // messages, because otherwise 'monotone commit -mfoo' giving an error, + // means that after you correct that error and hit up-arrow to try + // again, you get an "_MTN/log non-empty and message given on command + // line" error... which is annoying. write_user_log(data(log_message)); } @@ -3047,13 +3049,13 @@ // V V // chosen --> merged // - // - old is the revision specified in MT/revision + // - old is the revision specified in _MTN/revision // - working is based on old and includes the workspace's changes - // - chosen is the revision we're updating to and will end up in MT/revision + // - chosen is the revision we're updating to and will end up in _MTN/revision // - merged is the merge of working and chosen // // we apply the working to merged cset to the workspace - // and write the cset from chosen to merged changeset in MT/work + // and write the cset from chosen to merged changeset in _MTN/work cset update, remaining; make_cset (working_roster, merged_roster, update); ============================================================ --- file_io.cc 3ca8050b61b62ef9010b0ebfda755a0af9269104 +++ file_io.cc 547bf6f195554fd36499a1cfc95c1f571c2304b3 @@ -430,7 +430,7 @@ write_data_impl(any_path const & p, data const & dat) { - // we write, non-atomically, to MT/data.tmp. + // we write, non-atomically, to _MTN/data.tmp. // nb: no mucking around with multiple-writer conditions. we're a // single-user single-threaded program. you get what you paid for. assert_path_is_directory(bookkeeping_root); ============================================================ --- file_io.hh 362691f10f63d93e7cf83f299fe5aa0b4dcbee17 +++ file_io.hh 0757908d747cc57398930b69141588544a5af775 @@ -80,8 +80,8 @@ void read_data_for_command_line(utf8 const & path, data & dat); // These are not any_path's because we make our write somewhat atomic -- we -// first write to a temp file in MT/ (and it must be in MT/, not like /tmp or -// something, because we can't necessarily atomic rename from /tmp to the +// first write to a temp file in _MTN/ (and it must be in _MTN/, not like /tmp +// or something, because we can't necessarily atomic rename from /tmp to the // workspace). But that means we can't use it in general, only for the // workspace. void write_data(file_path const & path, data const & data); ============================================================ --- monotone.cc 32e0dec22f6beac4ab8271c51ff29cd7caefb5a3 +++ monotone.cc af5584575bd8cf33478f05f3d584e74badce7e34 @@ -94,7 +94,7 @@ {"xargs", '@', POPT_ARG_STRING, &argstr, OPT_ARGFILE, gettext_noop("insert command line arguments taken from the given file"), NULL}, {"ticker", 0, POPT_ARG_STRING, &argstr, OPT_TICKER, gettext_noop("set ticker style (count|dot|none)"), NULL}, {"nostd", 0, POPT_ARG_NONE, NULL, OPT_NOSTD, gettext_noop("do not load standard lua hooks"), NULL}, - {"norc", 0, POPT_ARG_NONE, NULL, OPT_NORC, gettext_noop("do not load ~/.monotone/monotonerc or MT/monotonerc lua files"), NULL}, + {"norc", 0, POPT_ARG_NONE, NULL, OPT_NORC, gettext_noop("do not load ~/.monotone/monotonerc or _MTN/monotonerc lua files"), NULL}, {"rcfile", 0, POPT_ARG_STRING, &argstr, OPT_RCFILE, gettext_noop("load extra rc file"), NULL}, {"key", 'k', POPT_ARG_STRING, &argstr, OPT_KEY_NAME, gettext_noop("set key for signatures"), NULL}, {"db", 'd', POPT_ARG_STRING, &argstr, OPT_DB_NAME, gettext_noop("set name of database"), NULL}, @@ -567,9 +567,9 @@ } // at this point we allow a workspace (meaning search for it - // and if found read MT/options, but don't use the data quite + // and if found read _MTN/options, but don't use the data quite // yet, and read all the monotonercs). Processing the data - // from MT/options happens later. + // from _MTN/options happens later. // Certain commands may subsequently require a workspace or fail // if we didn't find one at this point. ============================================================ --- paths.hh e81d1f0e7efdbff539b8b92f04ad357770130fd4 +++ paths.hh efc61a747969595d633387c4e3bb0705b7cd4a10 @@ -54,14 +54,14 @@ // functionality. // // -- bookkeeping_path -// this is a path representing something in the MT/ directory of a +// this is a path representing something in the _MTN/ directory of a // workspace. it has the same format restrictions as a file_path, -// except instead of being forbidden to point into the MT directory, it -// is _required_ to point into the MT directory. the one constructor is +// except instead of being forbidden to point into the _MTN directory, it +// is _required_ to point into the _MTN directory. the one constructor is // strict, and analogous to file_path_internal. however, the normal way // to construct bookkeeping_path's is to use the global constant -// 'bookkeeping_root', which points to the MT directory. Thus to -// construct a path pointing to MT/options, use: +// 'bookkeeping_root', which points to the _MTN directory. Thus to +// construct a path pointing to _MTN/options, use: // bookkeeping_root / "options" // // All path types should always be constructed from utf8-encoded strings. @@ -172,7 +172,7 @@ // to become relative to root of the workspace instead // both types of paths: // -- are confirmed to be normalized and relative - // -- not to be in MT/ + // -- not to be in _MTN/ file_path(source_type type, std::string const & path); friend file_path file_path_internal(std::string const & path); friend file_path file_path_external(utf8 const & path); @@ -192,7 +192,7 @@ { public: bookkeeping_path() {}; - // path _should_ contain the leading MT/ + // path _should_ contain the leading _MTN/ // and _should_ look like an internal path // usually you should just use the / operator as a constructor! bookkeeping_path(std::string const & path); ============================================================ --- restrictions.cc 543a6747d29e43971e5499b002e7e5975cac596a +++ restrictions.cc 4ab5354b84577d7fb51608719cce00c243e98f39 @@ -270,7 +270,7 @@ { // We did the following: // - // - restrict the working cset (MT/work) + // - restrict the working cset (_MTN/work) // - apply the working cset to the new roster, // giving us a rearranged roster (with incorrect content hashes) // - re-scan file contents, updating content hashes ============================================================ --- roster_merge.cc d1d307d2cc0fac8f4c50963b1563edcc3df26d86 +++ roster_merge.cc 6c1dd37b6bd8f6a47682513cff002e50a2cd4ef7 @@ -555,7 +555,7 @@ result.missing_root_dir = true; else { - // we can't have an illegal MT dir unless we have a root node in the + // we can't have an illegal _MTN dir unless we have a root node in the // first place... split_path bookkeeping_root_split; bookkeeping_root_split.push_back(the_null_component); @@ -609,7 +609,7 @@ // directory loops // orphans // name collision on root dir -// illegal node ("MT") +// illegal node ("_MTN") // missing root dir // // interactions: ============================================================ --- roster_merge.hh 3a86138ac40adb1f2736fc9f348988b91aea2ff4 +++ roster_merge.hh 695a1b81c873f9a264c10a7548eeb4a0ac1bf16b @@ -94,11 +94,11 @@ }; // renaming the root dir allows these: -// -- MT in root +// -- _MTN in root // -- missing root directory // this is a node that cleanly merged to some name, but that name was somehow -// forbidden. (Currently, the only forbidden name is "MT" in the root +// forbidden. (Currently, the only forbidden name is "_MTN" in the root // directory.) struct illegal_name_conflict { ============================================================ --- work.cc 4304e5c44e5ecfdbcd352c6f1a7367324fa6d7ec +++ work.cc bfd7914f0d53946522d25eee32d250ab8c1d4e42 @@ -401,9 +401,9 @@ N(is_dir_t(new_roster.get_node(new_root_sp)), F("proposed new root directory '%s' is not a directory") % new_root); { - split_path new_root_MT; - (new_root / bookkeeping_root.as_internal()).split(new_root_MT); - N(!new_roster.has_node(new_root_MT), + split_path new_root__MTN; + (new_root / bookkeeping_root.as_internal()).split(new_root__MTN); + N(!new_roster.has_node(new_root__MTN), F("proposed new root directory '%s' contains illegal path %s") % new_root % bookkeeping_root); } @@ -684,7 +684,7 @@ void read_options_map(data const & dat, options_map & options) { - basic_io::input_source src(dat(), "MT/options"); + basic_io::input_source src(dat(), "_MTN/options"); basic_io::tokenizer tok(src); basic_io::parser parser(tok); @@ -842,7 +842,7 @@ // Attaching/detaching the root directory: // This is tricky, because we don't want to simply move it around, like // other directories. That would require some very snazzy handling of the -// MT directory, and never be possible on windows anyway[1]. So, what we do +// _MTN directory, and never be possible on windows anyway[1]. So, what we do // is fake it -- whenever we want to move the root directory into the // temporary dir, we instead create a new dir in the temporary dir, move // all of the root's contents into this new dir, and make a note that the root @@ -852,8 +852,8 @@ // that it exists again. // // [1] Because the root directory is our working directory, and thus locked in -// place. We _could_ chdir out, then move MT out, then move the real root -// directory into our newly-moved MT, etc., but aside from being very finicky, +// place. We _could_ chdir out, then move _MTN out, then move the real root +// directory into our newly-moved _MTN, etc., but aside from being very finicky, // this would require that we know our root directory's name relative to its // parent. ============================================================ --- work.hh 60f47948673a128ebc9c533ace6cda4b2d027a51 +++ work.hh a33e8cce902fd92de5574360525a37747a680e0a @@ -21,31 +21,31 @@ // // -// workspace book-keeping files are stored in a directory called MT, off +// workspace book-keeping files are stored in a directory called _MTN, off // the root of the workspace source tree (analogous to the CVS or .svn -// directories). there is no hierarchy of MT directories; only one exists, +// directories). there is no hierarchy of _MTN directories; only one exists, // and it is always at the root. it contains the following files: // -// MT/revision -- contains the id of the checked out revision -// MT/work -- (optional) a set of added, deleted or moved pathnames +// _MTN/revision -- contains the id of the checked out revision +// _MTN/work -- (optional) a set of added, deleted or moved pathnames // this file is, syntactically, a cset -// MT/options -- the database, branch and key options currently in use -// MT/log -- user edited log file -// MT/inodeprints -- file fingerprint cache, presence turns on "reckless" +// _MTN/options -- the database, branch and key options currently in use +// _MTN/log -- user edited log file +// _MTN/inodeprints -- file fingerprint cache, presence turns on "reckless" // mode // // as work proceeds, the files in the workspace either change their // sha1 fingerprints from those listed in the revision's manifest, or else are // added or deleted or renamed (and the paths of those changes recorded in -// 'MT/work'). +// '_MTN/work'). // -// when it comes time to commit, the cset in MT/work (which can have no +// when it comes time to commit, the cset in _MTN/work (which can have no // deltas) is applied to the base roster, then a new roster is built by // analyzing the content of every file in the roster, as it appears in the // workspace. a final cset is calculated which contains the requisite // deltas, and placed in a rev, which is written to the db. // -// MT/inodes, if present, can be used to speed up this last step. +// _MTN/inodeprints, if present, can be used to speed up this last step. struct file_itemizer : public tree_walker { @@ -132,7 +132,7 @@ bool has_contents_user_log(); // the "options map" is another administrative file, stored in -// MT/options. it keeps a list of name/value pairs which are considered +// _MTN/options. it keeps a list of name/value pairs which are considered // "persistent options", associated with a particular the workspace and // implied unless overridden on the command line. the main ones are // --branch and --db, although some others may follow in the future. @@ -146,7 +146,7 @@ void write_options_map(data & dat, options_map const & options); -// the "local dump file' is a debugging file, stored in MT/debug. if we +// the "local dump file' is a debugging file, stored in _MTN/debug. if we // crash, we save some debugging information here. void get_local_dump_path(bookkeeping_path & d_path);