# # patch "ChangeLog" # from [dd6971785d439befeec27da2adfba924ec1f3e83] # to [dd11c7f42241940d81d3330645931eee218f44fc] # # patch "app_state.cc" # from [a5688247013ce25016c11677c8c5846a898dcfda] # to [cec53af9cdeeda70983bbde55e06d62848d0d945] # # patch "app_state.hh" # from [0d9e2a1d4749deb578f935f3d15efbf3bc6997b4] # to [bb2b7351c3e150113223e8a5e2b14840d0381f0c] # # patch "monotone.cc" # from [625a0ec935b892ba17a1e6f4757f4c7baa171cce] # to [2513af9f010d0fc778ab11385d7bec0379e720d4] # # patch "paths.hh" # from [cffb7a0bdb072d46c4b7ff07a5d26244e706dd4a] # to [d2705a51fbd78c222472bccc514ff3d1f6832c55] # # patch "unix/inodeprint.cc" # from [1ab3bfa972d2e79be8cf22a649b26e2d5875e622] # to [97d9fd62fa12374cde1be2c31269793730532084] # ======================================================================== --- ChangeLog dd6971785d439befeec27da2adfba924ec1f3e83 +++ ChangeLog dd11c7f42241940d81d3330645931eee218f44fc @@ -1,5 +1,10 @@ 2005-08-24 Nathaniel Smith
+ * paths.hh, monotone.cc, app_state.hh, app_state.cc: + * unix/inodeprint.cc: More compile fixes. + +2005-08-24 Nathaniel Smith + * manifest.hh: Include paths.hh. * file_io.hh: Fix syntax errors, and fixup interface. ======================================================================== --- app_state.cc a5688247013ce25016c11677c8c5846a898dcfda +++ app_state.cc cec53af9cdeeda70983bbde55e06d62848d0d945 @@ -19,6 +19,7 @@ #include "sanity.hh" #include "transforms.hh" #include "work.hh" +#include "platform.hh" // copyright (C) 2002, 2003 graydon hoare // all rights reserved. @@ -32,7 +33,7 @@ static string const key_option("key"); app_state::app_state() - : branch_name(""), db(""), stdhooks(true), rcfiles(true), diffs(false), + : branch_name(""), db(system_path()), stdhooks(true), rcfiles(true), diffs(false), no_merges(false), set_default(false), verbose(false), search_root("/"), depth(-1), last(-1), diff_format(unified_diff), diff_args_provided(false), use_lca(false) @@ -72,15 +73,15 @@ if (!current.empty()) { relative_directory = file_path(current.native_directory_string()); - L(F("relative directory is '%s'\n") % relative_directory()); + L(F("relative directory is '%s'\n") % relative_directory); } - if (global_sanity.filename == "") + if (global_sanity.filename.empty()) { - local_path dump_path; + bookkeeping_path dump_path; get_local_dump_path(dump_path); L(F("setting dump path to %s\n") % dump_path); - global_sanity.filename = dump_path(); + global_sanity.filename = dump_path; } } load_rcfiles(); @@ -133,7 +134,7 @@ L(F("creating book-keeping directory '%s' for working copy in '%s'\n") % bookkeeping_root % target); - mkdir_p(mt); + mkdir_p(bookkeeping_root); make_branch_sticky(); @@ -160,14 +161,14 @@ if (respect_ignore && lua.hook_ignore_file(p)) { - L(F("'%s' ignored by restricted path set\n") % p()); + L(F("'%s' ignored by restricted path set\n") % p); continue; } N(p == root || valid_paths.find(p) != valid_paths.end(), - F("unknown path '%s'\n") % p()); + F("unknown path '%s'\n") % p); - L(F("'%s' added to restricted path set\n") % p()); + L(F("'%s' added to restricted path set\n") % p); restrictions.insert(p); } @@ -200,7 +201,7 @@ return true; } - fs::path test = mkpath(path()); + fs::path test = fs::path(path.as_external(), fs::native); long branch_depth = 0; long max_depth = depth + 1; @@ -214,13 +215,13 @@ if (i != restrictions.end()) { L(F("path '%s' found in restricted path set; '%s' included\n") - % test.string() % path()); + % test.string() % path); return true; } else { L(F("path '%s' not found in restricted path set; '%s' excluded\n") - % test.string() % path()); + % test.string() % path); } if (user_supplied_depth && (max_depth == branch_depth)) return false; @@ -273,15 +274,14 @@ } void -app_state::set_root(utf8 const & path) +app_state::set_root(system_path const & path) { - search_root = absolutify(path()); - fs::path root = mkpath(search_root()); - N(fs::exists(root), - F("search root '%s' does not exist\n") % search_root); - N(fs::is_directory(root), - F("search root '%s' is not a directory\n") % search_root); - L(F("set search root to %s\n") % search_root); + N(path_state(root), + F("search root '%s' does not exist\n") % root); + N(is_directory(root), + F("search root '%s' is not a directory\n") % root); + root = path; + L(F("set search root to %s\n") % root); } void @@ -416,7 +416,7 @@ void app_state::read_options() { - local_path o_path; + bookkeeping_path o_path; get_options_path(o_path); try { ======================================================================== --- app_state.hh 0d9e2a1d4749deb578f935f3d15efbf3bc6997b4 +++ app_state.hh bb2b7351c3e150113223e8a5e2b14840d0381f0c @@ -45,7 +45,7 @@ utf8 message_file; utf8 date; utf8 author; - utf8 search_root; + system_path search_root; std::vector