# # patch "ChangeLog" # from [8383a15808ebd32ad57433efe3dce087c3f268a2] # to [2b2a7734613dfc5b0127b902a22934c41efb7389] # # patch "app_state.cc" # from [98405b4920c78d88f2c1854a35e8e94640234604] # to [201f486c9447e06e4de252db8656896a56ce3723] # # patch "app_state.hh" # from [8bfec96641911e1f330522c618427b661fbc0dd0] # to [0c4a6377b293071abac920c5dcba7d8a192570dc] # # patch "monotone.cc" # from [577add6b7ecb796267e7aff85997a2795c20a1ef] # to [625a0ec935b892ba17a1e6f4757f4c7baa171cce] # # patch "paths.hh" # from [1aa910b01bdbca07ffa1b4081446fe77883eea15] # to [a2c5f09f4dfa841b54e7a163f45d765cf32e0e2b] # ======================================================================== --- ChangeLog 8383a15808ebd32ad57433efe3dce087c3f268a2 +++ ChangeLog 2b2a7734613dfc5b0127b902a22934c41efb7389 @@ -1,5 +1,13 @@ 2005-08-23 Nathaniel Smith + * paths.hh (any_path::as_internal): On second thought, return a + utf8 object. + * app_state.cc (set_database): Take a system_path. + (set_pidfile): Likewise. + * monotone.cc (cpp_main): Pass one. + +2005-08-23 Nathaniel Smith + * file_io.hh (get_homedir): Return a system_path. * app_state.hh (app_state): Make pidfile a system_path. * sanity.hh (sanity::filename): Make a system_path. ======================================================================== --- app_state.cc 98405b4920c78d88f2c1854a35e8e94640234604 +++ app_state.cc 201f486c9447e06e4de252db8656896a56ce3723 @@ -254,12 +254,11 @@ } void -app_state::set_database(utf8 const & filename) +app_state::set_database(system_path const & filename) { - string dbname = absolutify(filename()); - if (dbname != "") db.set_filename(mkpath(dbname)); + if (!filename.empty()) db.set_filename(filename); - options[database_option] = utf8(dbname); + options[database_option] = filename.as_internal(); } void @@ -343,9 +342,9 @@ } void -app_state::set_pidfile(utf8 const & p) +app_state::set_pidfile(system_path const & p) { - pidfile = mkpath(p()); + pidfile = p; } void ======================================================================== --- app_state.hh 8bfec96641911e1f330522c618427b661fbc0dd0 +++ app_state.hh 0c4a6377b293071abac920c5dcba7d8a192570dc @@ -91,7 +91,7 @@ void set_branch(utf8 const & name); void make_branch_sticky(); - void set_database(utf8 const & filename); + void set_database(system_path const & filename); void set_signing_key(utf8 const & key); void set_root(utf8 const & root); void set_message(utf8 const & message); @@ -100,7 +100,7 @@ void set_author(utf8 const & author); void set_depth(long depth); void set_last(long last); - void set_pidfile(utf8 const & pidfile); + void set_pidfile(system_path const & pidfile); void add_revision(utf8 const & selector); void add_exclude(utf8 const & exclude_pattern); void set_diff_format(diff_type dtype); ======================================================================== --- monotone.cc 577add6b7ecb796267e7aff85997a2795c20a1ef +++ monotone.cc 625a0ec935b892ba17a1e6f4757f4c7baa171cce @@ -328,7 +328,7 @@ break; case OPT_DB_NAME: - app.set_database(absolutify(tilde_expand(string(argstr)))); + app.set_database(system_path(argstr)); break; case OPT_TICKER: @@ -413,7 +413,7 @@ break; case OPT_PIDFILE: - app.set_pidfile(absolutify(tilde_expand(string(argstr)))); + app.set_pidfile(system_path(argstr)); break; case OPT_ARGFILE: ======================================================================== --- paths.hh 1aa910b01bdbca07ffa1b4081446fe77883eea15 +++ paths.hh a2c5f09f4dfa841b54e7a163f45d765cf32e0e2b @@ -34,8 +34,8 @@ // converts to native charset and path syntax std::string as_external() const; // leaves as utf8 - std::string const & as_internal() const - { return data(); } + utf8 const & as_internal() const + { return data; } protected: utf8 data; private: