# # # patch "cmd_list.cc" # from [0ddc629143507c28f4fdbf9ab994e06aff95bd37] # to [4484b5f175f144ffe3f505686eebf169941db916] # # patch "database.cc" # from [0b4996448c9a11e065702c2ca6b9f450286029fb] # to [85d1281f3f3279df835bcff0d71e6a1d3c9b295b] # # patch "work.cc" # from [fdd9806c7a8fe502a405bfe2902ecf76e91a5d82] # to [cb9eb731403670c5158f7ce9c94de5de611dc5f7] # ============================================================ --- cmd_list.cc 0ddc629143507c28f4fdbf9ab994e06aff95bd37 +++ cmd_list.cc 4484b5f175f144ffe3f505686eebf169941db916 @@ -619,12 +619,12 @@ CMD(databases, "databases", "dbs", CMD_R "", options::opts::none) { - std::vector search_paths, files, dirs; + vector search_paths, files, dirs; E(app.lua.hook_get_default_database_locations(search_paths), origin::database, F("could not query default database locations")); - for (std::vector::const_iterator i = search_paths.begin(); + for (vector::const_iterator i = search_paths.begin(); i != search_paths.end(); ++i) { system_path search_path(*i); @@ -633,13 +633,13 @@ CMD(databases, "databases", "dbs", CMD_R fill_path_vec fill_dirs(search_path, dirs, true); read_directory(search_path, fill_files, fill_dirs); - for (std::vector::const_iterator j = files.begin(); + for (vector::const_iterator j = files.begin(); j != files.end(); ++j) { system_path db_path(*j); // a little optimization, so we don't scan and open every file - std::string p = db_path.as_internal(); + string p = db_path.as_internal(); if (p.size() < 4 || p.substr(p.size() - 4) != ".mtn") { L(FL("ignoring file '%s'") % db_path); @@ -662,7 +662,7 @@ CMD(databases, "databases", "dbs", CMD_R continue; } - std::string managed_path = db_path.as_internal().substr( + string managed_path = db_path.as_internal().substr( search_path.as_internal().size() + 1 ); cout << F(":%s (in %s):") % managed_path % search_path << '\n'; @@ -677,10 +677,10 @@ CMD(databases, "databases", "dbs", CMD_R var_value val; db.get_var(key, val); - std::vector workspaces; + vector workspaces; split_into_lines(val(), workspaces); - for (std::vector::const_iterator k = workspaces.begin(); + for (vector::const_iterator k = workspaces.begin(); k != workspaces.end(); ++k) { system_path workspace_path(*k, origin::database); @@ -709,7 +709,7 @@ CMD(databases, "databases", "dbs", CMD_R has_known_workspaces = true; - std::string workspace_branch = workspace_opts.branch(); + string workspace_branch = workspace_opts.branch(); if (!workspace_opts.branch_given) workspace_branch = _(""); ============================================================ --- database.cc 0b4996448c9a11e065702c2ca6b9f450286029fb +++ database.cc 85d1281f3f3279df835bcff0d71e6a1d3c9b295b @@ -489,28 +489,28 @@ void } void -resolve_db_alias(lua_hooks & lua, std::string const & alias, system_path & path) +resolve_db_alias(lua_hooks & lua, string const & alias, system_path & path) { // we take care of this in the options code I(alias.find(':') == 0); - std::string pc = alias.substr(1); + string pc = alias.substr(1); size_t pos = pc.find('/'); - E(pos == std::string::npos, origin::user, + E(pos == string::npos, origin::user, F("invalid database alias '%s'") % pc); pos = pc.rfind('.'); - if (pos == std::string::npos || pc.substr(pos + 1) != "mtn") + if (pos == string::npos || pc.substr(pos + 1) != "mtn") pc += ".mtn"; path_component basename(pc, origin::user); - std::vector candidates; - std::vector search_paths; + vector candidates; + vector search_paths; E(lua.hook_get_default_database_locations(search_paths), origin::database, F("could not query default database locations")); - for (std::vector::const_iterator i = search_paths.begin(); + for (vector::const_iterator i = search_paths.begin(); i != search_paths.end(); ++i) { if (file_exists((*i) / basename)) @@ -544,7 +544,7 @@ resolve_db_alias(lua_hooks & lua, std::s (F("the managed database name ':%s' has multiple " "ambiguous expansions:") % pc).str(); - for (std::vector::const_iterator i = candidates.begin(); + for (vector::const_iterator i = candidates.begin(); i != candidates.end(); ++i) err += ("\n " + (*i).as_internal()); @@ -3906,7 +3906,7 @@ namespace { set bad_sigs; set unknown_sigs; }; - + // returns *one* of each trusted cert key/value // if two keys signed the same thing, we get two certs as input and // just pick one (assuming neither is invalid) to use in the output @@ -4593,7 +4593,7 @@ database_impl::open() { I(!__sql); - std::string to_open; + string to_open; if (type == memory_db) to_open = ":memory:"; else ============================================================ --- work.cc fdd9806c7a8fe502a405bfe2902ecf76e91a5d82 +++ work.cc cb9eb731403670c5158f7ce9c94de5de611dc5f7 @@ -651,17 +651,17 @@ workspace::set_options(options const & o var_value val; old_db.get_var(key, val); - std::vector workspaces; + vector workspaces; split_into_lines(val(), workspaces); - std::vector::iterator pos = - std::find(workspaces.begin(), - workspaces.end(), - current_workspace.as_internal()); + vector::iterator pos = + find(workspaces.begin(), + workspaces.end(), + current_workspace.as_internal()); if (pos != workspaces.end()) workspaces.erase(pos); - std::string ws; + string ws; join_lines(workspaces, ws); old_db.set_var(key, var_value(ws, origin::internal)); @@ -672,17 +672,17 @@ workspace::set_options(options const & o if (new_db.var_exists(key)) new_db.get_var(key, val); - std::vector workspaces; + vector workspaces; split_into_lines(val(), workspaces); - std::vector::iterator pos = - std::find(workspaces.begin(), - workspaces.end(), - current_workspace.as_internal()); + vector::iterator pos = + find(workspaces.begin(), + workspaces.end(), + current_workspace.as_internal()); if (pos == workspaces.end()) workspaces.push_back(current_workspace.as_internal()); - std::string ws; + string ws; join_lines(workspaces, ws); new_db.set_var(key, var_value(ws, origin::internal));