#
#
# patch "ChangeLog"
# from [dd911157c0cc9de3b27fb9fbe9454021a93b9966]
# to [c3b470704b44ee8cf9b7e71cc66a9689b4d3a8ed]
#
# patch "app_state.cc"
# from [2af59d84eedf016fb3ad85d1c0e76667070d2fc6]
# to [fbca19a07395eb7a0ca3093ba553f7f14a95a5da]
#
# patch "charset.cc"
# from [c958f957b5deca18a5803c512ae5cf58d08b5fb1]
# to [c483886c40e8518c94191dc0a3a5388bdd8b2efd]
#
# patch "cmd.hh"
# from [60c6bbe98e2513189c4cd84d8b6cfcc6429e15f5]
# to [76fe4ececf8426484d8a4aca7c54237c49ce6100]
#
# patch "cmd_automate.cc"
# from [9888db8b3c4b072092f933a65973fa42e94f7980]
# to [37baff9dc561c7fad66b88559fda15b14f2a4f55]
#
# patch "cmd_files.cc"
# from [d8a4d7557dacbd31b9d9b7b15b62d231dcfbfe43]
# to [22b692fc7848cf47a7572d4df48b0ffeeaa56c5c]
#
# patch "cmd_key_cert.cc"
# from [6b1f09475de549a193b7604f4512b0a4e6a5ff2e]
# to [4f07a55505d99f4a1680313d47e7a813a4bd1517]
#
# patch "cmd_list.cc"
# from [7647566d20b4a6c7c435b01f92ea90838c12646c]
# to [5edf0ae19d13ccc9d25490eb64576bff4ad907ca]
#
# patch "cmd_merging.cc"
# from [14dbf8776d68cf092e76c4d7479afaafd24e4705]
# to [96f80ecb901481df3d98fc172d9d51bc9f3d2ecb]
#
# patch "cmd_othervcs.cc"
# from [2a6c2ccd297e79ee652a1c7189e7d3c45de47c40]
# to [47651b6f63bd48be121a30eec4d1746238151fd2]
#
# patch "cmd_ws_commit.cc"
# from [159a7abbffa9e3992f5a3dba2af148de388e1f53]
# to [68054c3ca3570251658995090213710f8dd8789c]
#
# patch "commands.cc"
# from [9eb8b9fe197b66baa555579ff90b5e1ed9f9c8dd]
# to [579d73cf72936f2493bfe1fa4cec133d42106469]
#
# patch "database.cc"
# from [0d25c2fa019f20eb0b7299f2b569a4091571aed1]
# to [5be1a06699c299ad0a21ea404c183303fae5369e]
#
# patch "diff_patch.cc"
# from [511663fbae9b2a0703e0a1d25b3519746d97e292]
# to [b854d0d4444480e98b9ed8e2aa936d700de1cc22]
#
# patch "keys.cc"
# from [eead65f2b15cfeb98d1360ef91d3ee1128e98d0a]
# to [3d835d4757415bf43f821941e2a37bdbc1c4f2db]
#
# patch "restrictions.cc"
# from [8a45208f6fdad11caf24a17aa2e05b908135a357]
# to [d7c60923a328aefb9a8429ecb6654586ce31a3f9]
#
# patch "restrictions.hh"
# from [de2f4620c0e8ca01eebfb919b0735e6e4182bb14]
# to [797c6f69647ff3a63870f7870b88353840cf9200]
#
# patch "revision.cc"
# from [ef6feacfdac32584040843bcd70f3bb66df67ad7]
# to [8b358213321192d8a1f65992915ed1b20dd2cbbe]
#
# patch "schema_migration.cc"
# from [e26608a79f5d7cef3cc41da156dfc6d5f5f840db]
# to [3b14626a3cf5917254ec38dc54edd63b03a2c6f2]
#
# patch "string_queue.cc"
# from [8e101f4569d10559b9bcac8b08677d5332e96ac1]
# to [06e46ddd188c16242e046af4cfaea6556d381393]
#
# patch "transforms.cc"
# from [9e1877e1127950f7a5a00e3eb1b2e8a90aa8d4aa]
# to [a4754b188afa931450b7dc5b49d077a5a39e8073]
#
# patch "txt2c.cc"
# from [af464696310692534add8c0ac8e078b622b98630]
# to [85a07a8bc034fbd6be456d6d5028ba26f362303a]
#
# patch "update.cc"
# from [2e6155771b60acaa2b08ec72951cad1ee55d68f8]
# to [a6ab1750719839bd9da8ac0db8c9181b60167890]
#
# patch "work.cc"
# from [741e5e93dd1fffecaabdeb5e59b8cd7d76f52404]
# to [9e2f2b5bf64d0d0b40ce813e21cfd194cdca64d0]
#
# patch "xdelta.cc"
# from [d884013d3dc309f7dfa6f3d4541adb2ba3ef981e]
# to [257b87980b8477f0b2ffe1f4158efcd1866b38a4]
#
============================================================
--- ChangeLog dd911157c0cc9de3b27fb9fbe9454021a93b9966
+++ ChangeLog c3b470704b44ee8cf9b7e71cc66a9689b4d3a8ed
@@ -1,3 +1,31 @@
+2006-05-28 Derek Scherger
+
+ * app_state.cc:
+ * charset.cc:
+ * cmd.hh:
+ * cmd_automate.cc:
+ * cmd_files.cc:
+ * cmd_key_cert.cc:
+ * cmd_list.cc:
+ * cmd_merging.cc:
+ * cmd_othervcs.cc:
+ * cmd_ws_commit.cc:
+ * commands.cc:
+ * database.cc:
+ * diff_patch.cc:
+ * keys.cc:
+ * restrictions.cc:
+ * restrictions.hh:
+ * revision.cc:
+ * schema_migration.cc:
+ * string_queue.cc:
+ * transforms.cc:
+ * txt2c.cc:
+ * update.cc:
+ * work.cc:
+ * xdelta.cc:
+ more namespace fixups
+
2006-05-28 Richard Levitte
* po/sv.po: A few new and fuzzy strings to (re)translate.
============================================================
--- app_state.cc 2af59d84eedf016fb3ad85d1c0e76667070d2fc6
+++ app_state.cc fbca19a07395eb7a0ca3093ba553f7f14a95a5da
@@ -20,14 +20,13 @@
using std::exception;
using std::map;
using std::string;
+using std::vector;
// copyright (C) 2002, 2003 graydon hoare
// all rights reserved.
// licensed to the public under the terms of the GNU GPL (>= 2)
// see the file COPYING for details
-using namespace std;
-
static string const database_option("database");
static string const branch_option("branch");
static string const key_option("key");
============================================================
--- charset.cc c958f957b5deca18a5803c512ae5cf58d08b5fb1
+++ charset.cc c483886c40e8518c94191dc0a3a5388bdd8b2efd
@@ -13,6 +13,8 @@
using std::string;
using std::vector;
+using boost::char_separator;
+
// general character code conversion routines
static string
@@ -326,9 +328,9 @@
internalize_rsa_keypair_id(utf8 const & utf, rsa_keypair_id & key)
{
string tmp;
- typedef boost::tokenizer >
+ typedef boost::tokenizer >
tokenizer;
- boost::char_separator sep("", ".@", boost::keep_empty_tokens);
+ char_separator sep("", ".@", boost::keep_empty_tokens);
tokenizer tokens(utf(), sep);
bool in_domain = false;
for(tokenizer::iterator i = tokens.begin(); i != tokens.end(); ++i)
@@ -359,9 +361,9 @@
externalize_rsa_keypair_id(rsa_keypair_id const & key, utf8 & utf)
{
string tmp;
- typedef boost::tokenizer >
+ typedef boost::tokenizer >
tokenizer;
- boost::char_separator sep("", ".@", boost::keep_empty_tokens);
+ char_separator sep("", ".@", boost::keep_empty_tokens);
tokenizer tokens(key(), sep);
bool in_domain = false;
for(tokenizer::iterator i = tokens.begin(); i != tokens.end(); ++i)
============================================================
--- cmd.hh 60c6bbe98e2513189c4cd84d8b6cfcc6429e15f5
+++ cmd.hh 76fe4ececf8426484d8a4aca7c54237c49ce6100
@@ -8,16 +8,12 @@
#include "commands.hh"
-using std::string;
-using std::vector;
-
namespace commands
{
- using std::set;
struct no_opts {};
struct command_opts
{
- set opts;
+ std::set opts;
command_opts() {}
command_opts & operator%(int o)
{ opts.insert(o); return *this; }
@@ -33,64 +29,63 @@
// NB: these strings are stred _un_translated
// because we cannot translate them until after main starts, by which time
// the command objects have all been constructed.
- string name;
- string cmdgroup;
- string params;
- string desc;
+ std::string name;
+ std::string cmdgroup;
+ std::string params;
+ std::string desc;
bool use_workspace_options;
command_opts options;
- command(string const & n,
- string const & g,
- string const & p,
- string const & d,
+ command(std::string const & n,
+ std::string const & g,
+ std::string const & p,
+ std::string const & d,
bool u,
command_opts const & o);
virtual ~command();
- virtual void exec(app_state & app, vector const & args) = 0;
+ virtual void exec(app_state & app, std::vector const & args) = 0;
};
};
-string
+std::string
get_stdin();
-string
+std::string
describe_revision(app_state & app,
revision_id const & id);
void
complete(app_state & app,
- string const & str,
+ std::string const & str,
revision_id & completion,
bool must_exist=true);
void
complete(app_state & app,
- string const & str,
+ std::string const & str,
std::set & completion,
bool must_exist=true);
template
static void
complete(app_state & app,
- string const & str,
+ std::string const & str,
ID & completion)
{
- using std::set;
- N(str.find_first_not_of(constants::legal_id_bytes) == string::npos,
+ N(str.find_first_not_of(constants::legal_id_bytes) == std::string::npos,
F("non-hex digits in id"));
if (str.size() == constants::idlen)
{
completion = ID(str);
return;
}
- set completions;
+ std::set completions;
app.db.complete(str, completions);
N(completions.size() != 0,
F("partial id '%s' does not have an expansion") % str);
if (completions.size() > 1)
{
- string err = (F("partial id '%s' has multiple ambiguous expansions:\n") % str).str();
- for (typename set::const_iterator i = completions.begin();
+ std::string err = (F("partial id '%s' has multiple ambiguous expansions:\n") % str).str();
+ for (typename std::set::const_iterator i = completions.begin();
i != completions.end(); ++i)
err += (i->inner()() + "\n");
N(completions.size() == 1, i18n_format(err));
@@ -108,7 +103,7 @@
void
process_commit_message_args(bool & given,
- string & log_message,
+ std::string & log_message,
app_state & app);
#define CMD(C, group, params, desc, opts) \
@@ -119,12 +114,12 @@
command_opts() % opts) \
{} \
virtual void exec(app_state & app, \
- vector const & args); \
+ std::vector const & args); \
}; \
static cmd_ ## C C ## _cmd; \
} \
void commands::cmd_ ## C::exec(app_state & app, \
- vector const & args) \
+ std::vector const & args) \
// use this for commands that should specifically _not_ look for an _MTN dir
// and load options from it
@@ -136,19 +131,19 @@
command_opts() % opts) \
{} \
virtual void exec(app_state & app, \
- vector const & args); \
+ std::vector const & args); \
}; \
static cmd_ ## C C ## _cmd; \
} \
void commands::cmd_ ## C::exec(app_state & app, \
- vector const & args) \
+ std::vector const & args) \
#define ALIAS(C, realcommand) \
CMD(C, realcommand##_cmd.cmdgroup, realcommand##_cmd.params, \
realcommand##_cmd.desc + "\nAlias for " #realcommand, \
realcommand##_cmd.options) \
{ \
- process(app, string(#realcommand), args); \
+ process(app, std::string(#realcommand), args); \
}
#endif
============================================================
--- cmd_automate.cc 9888db8b3c4b072092f933a65973fa42e94f7980
+++ cmd_automate.cc 37baff9dc561c7fad66b88559fda15b14f2a4f55
@@ -5,6 +5,7 @@
#include
using std::cout;
+using std::vector;
CMD(automate, N_("automation"),
N_("interface_version\n"
============================================================
--- cmd_files.cc d8a4d7557dacbd31b9d9b7b15b62d231dcfbfe43
+++ cmd_files.cc 22b692fc7848cf47a7572d4df48b0ffeeaa56c5c
@@ -8,8 +8,11 @@
#include "localized_file_io.hh"
#include
+
using std::cout;
using std::ostream_iterator;
+using std::string;
+using std::vector;
// fload and fmerge are simple commands for debugging the line
// merger.
============================================================
--- cmd_key_cert.cc 6b1f09475de549a193b7604f4512b0a4e6a5ff2e
+++ cmd_key_cert.cc 4f07a55505d99f4a1680313d47e7a813a4bd1517
@@ -7,10 +7,13 @@
#include "packet.hh"
#include
-using std::ostringstream;
-using std::ostream_iterator;
#include
+
using std::cout;
+using std::ostream_iterator;
+using std::ostringstream;
+using std::set;
+using std::string;
CMD(genkey, N_("key and cert"), N_("KEYID"), N_("generate an RSA key-pair"), OPT_NONE)
{
============================================================
--- cmd_list.cc 7647566d20b4a6c7c435b01f92ea90838c12646c
+++ cmd_list.cc 5edf0ae19d13ccc9d25490eb64576bff4ad907ca
@@ -24,6 +24,7 @@
using std::set;
using std::sort;
using std::string;
+using std::vector;
static void
ls_certs(string const & name, app_state & app, vector const & args)
============================================================
--- cmd_merging.cc 14dbf8776d68cf092e76c4d7479afaafd24e4705
+++ cmd_merging.cc 96f80ecb901481df3d98fc172d9d51bc9f3d2ecb
@@ -15,7 +15,11 @@
using std::cout;
using std::map;
using std::set;
+using std::string;
+using std::vector;
+using boost::shared_ptr;
+
struct update_source
: public file_content_source
{
@@ -46,7 +50,7 @@
{
revision_set r_working;
roster_t working_roster, chosen_roster, target_roster;
- boost::shared_ptr old_roster = boost::shared_ptr(new roster_t());
+ shared_ptr old_roster = shared_ptr(new roster_t());
marking_map working_mm, chosen_mm, merged_mm, target_mm;
revision_id r_old_id, r_working_id, r_chosen_id, r_target_id;
temp_node_id_source nis;
============================================================
--- cmd_othervcs.cc 2a6c2ccd297e79ee652a1c7189e7d3c45de47c40
+++ cmd_othervcs.cc 47651b6f63bd48be121a30eec4d1746238151fd2
@@ -1,7 +1,9 @@
#include "cmd.hh"
#include "rcs_import.hh"
+using std::vector;
+
CMD(rcs_import, N_("debug"), N_("RCSFILE..."),
N_("parse versions in RCS files\n"
"this command doesn't reconstruct or import revisions."
============================================================
--- cmd_ws_commit.cc 159a7abbffa9e3992f5a3dba2af148de388e1f53
+++ cmd_ws_commit.cc 68054c3ca3570251658995090213710f8dd8789c
@@ -15,7 +15,12 @@
using std::make_pair;
using std::pair;
using std::map;
+using std::set;
+using std::string;
+using std::vector;
+using boost::shared_ptr;
+
static void
get_log_message_interactively(revision_set const & cs,
app_state & app,
@@ -156,7 +161,7 @@
revision_id r;
revision_set rev, rev_inverse;
- boost::shared_ptr cs_inverse(new cset());
+ shared_ptr cs_inverse(new cset());
complete(app, idx(args, 0)(), r);
app.db.get_revision(r, rev);
============================================================
--- commands.cc 9eb8b9fe197b66baa555579ff90b5e1ed9f9c8dd
+++ commands.cc 579d73cf72936f2493bfe1fa4cec133d42106469
@@ -20,8 +20,8 @@
using std::pair;
using std::set;
using std::string;
+using std::vector;
-
//
// this file defines the task-oriented "top level" commands which can be
// issued as part of a monotone command line. the command line can only
============================================================
--- database.cc 0d25c2fa019f20eb0b7299f2b569a4091571aed1
+++ database.cc 5be1a06699c299ad0a21ea404c183303fae5369e
@@ -1201,7 +1201,7 @@
get(curr, begin, data_table);
}
- boost::shared_ptr app = new_piecewise_applicator();
+ shared_ptr app = new_piecewise_applicator();
app->begin(begin());
for (version_path::reverse_iterator i = selected_path->rbegin();
@@ -2769,7 +2769,7 @@
}
static LRUCache > >
+ shared_ptr > >
rcache(constants::db_roster_cache_sz);
void
@@ -2784,7 +2784,7 @@
return;
}
- boost::shared_ptr > sp;
+ shared_ptr > sp;
if (rcache.fetch(rev_id, sp))
{
roster = sp->first;
@@ -2798,7 +2798,7 @@
get_roster_id_for_revision(rev_id, ident);
get_roster_version(ident, dat);
read_roster_and_marking(dat, roster, marks);
- sp = boost::shared_ptr >
+ sp = shared_ptr >
(new pair(roster, marks));
rcache.insert(rev_id, sp);
}
@@ -2816,7 +2816,7 @@
if (!rcache.exists(rev_id))
{
- boost::shared_ptr > sp
+ shared_ptr > sp
(new pair(roster, marks));
rcache.insert(rev_id, sp);
}
============================================================
--- diff_patch.cc 511663fbae9b2a0703e0a1d25b3519746d97e292
+++ diff_patch.cc b854d0d4444480e98b9ed8e2aa936d700de1cc22
@@ -533,7 +533,7 @@
void
content_merge_database_adaptor::get_ancestral_roster(node_id nid,
- boost::shared_ptr & anc)
+ shared_ptr & anc)
{
// Given a file, if the lca is nonzero and its roster contains the file,
// then we use its roster. Otherwise we use the roster at the file's
@@ -581,7 +581,7 @@
void
content_merge_workspace_adaptor::get_ancestral_roster(node_id nid,
- boost::shared_ptr & anc)
+ shared_ptr & anc)
{
// When doing an update, the base revision is always the ancestor to
// use for content merging.
============================================================
--- keys.cc eead65f2b15cfeb98d1360ef91d3ee1128e98d0a
+++ keys.cc 3d835d4757415bf43f821941e2a37bdbc1c4f2db
@@ -24,9 +24,27 @@
#include "cert.hh"
#include "app_state.hh"
+using std::cout;
+using std::endl;
+using std::make_pair;
using std::map;
using std::string;
+using boost::shared_ptr;
+using boost::shared_dynamic_cast;
+
+using Botan::byte;
+using Botan::PKCS8_PrivateKey;
+using Botan::PK_Decryptor;
+using Botan::PK_Encryptor;
+using Botan::PK_Signer;
+using Botan::PK_Verifier;
+using Botan::Pipe;
+using Botan::RSA_PrivateKey;
+using Botan::RSA_PublicKey;
+using Botan::SecureVector;
+using Botan::X509_PublicKey;
+
// copyright (C) 2002, 2003, 2004 graydon hoare
// all rights reserved.
// licensed to the public under the terms of the GNU GPL (>= 2)
@@ -35,18 +53,12 @@
// there will probably forever be bugs in this file. it's very
// hard to get right, portably and securely. sorry about that.
-using namespace Botan;
-using namespace std;
-
-using boost::shared_ptr;
-using boost::shared_dynamic_cast;
-
static void
do_arc4(SecureVector & sym_key,
SecureVector & payload)
{
L(FL("running arc4 process on %d bytes of data\n") % payload.size());
- Pipe enc(get_cipher("ARC4", sym_key, ENCRYPTION));
+ Pipe enc(get_cipher("ARC4", sym_key, Botan::ENCRYPTION));
enc.process_msg(payload);
payload = enc.read_all();
}
@@ -168,14 +180,14 @@
Pipe p;
p.start_msg();
- PKCS8::encrypt_key(priv, p, phrase,
- "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", RAW_BER);
+ Botan::PKCS8::encrypt_key(priv, p, phrase,
+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", Botan::RAW_BER);
raw_priv_key = rsa_priv_key(p.read_all_as_string());
// generate public key
Pipe p2;
p2.start_msg();
- X509::encode(priv, p2, RAW_BER);
+ Botan::X509::encode(priv, p2, Botan::RAW_BER);
raw_pub_key = rsa_pub_key(p2.read_all_as_string());
// if all that worked, we can return our results to caller
@@ -210,7 +222,7 @@
{
Pipe p;
p.process_msg(decoded_key());
- pkcs8_key = shared_ptr(PKCS8::load_key(p, phrase));
+ pkcs8_key = shared_ptr(Botan::PKCS8::load_key(p, phrase));
}
catch (...)
{
@@ -266,7 +278,7 @@
{
Pipe p;
p.process_msg(decrypted_key);
- pkcs8_key = shared_ptr(PKCS8::load_key(p, "", false));
+ pkcs8_key = shared_ptr(Botan::PKCS8::load_key(p, "", false));
}
catch (...)
{
@@ -288,15 +300,15 @@
// now we can write out the new key
Pipe p;
p.start_msg();
- PKCS8::encrypt_key(*priv_key, p, phrase,
- "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", RAW_BER);
+ Botan::PKCS8::encrypt_key(*priv_key, p, phrase,
+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", Botan::RAW_BER);
rsa_priv_key raw_priv = rsa_priv_key(p.read_all_as_string());
encode_base64(raw_priv, new_kp.priv);
// also the public portion
Pipe p2;
p2.start_msg();
- X509::encode(*priv_key, p2, RAW_BER);
+ Botan::X509::encode(*priv_key, p2, Botan::RAW_BER);
rsa_pub_key raw_pub = rsa_pub_key(p2.read_all_as_string());
encode_base64(raw_pub, new_kp.pub);
}
@@ -313,8 +325,8 @@
Pipe p;
p.start_msg();
- PKCS8::encrypt_key(*priv, p, new_phrase,
- "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", RAW_BER);
+ Botan::PKCS8::encrypt_key(*priv, p, new_phrase,
+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", Botan::RAW_BER);
rsa_priv_key decoded_key = rsa_priv_key(p.read_all_as_string());
encode_base64(decoded_key, encoded_key);
@@ -388,7 +400,7 @@
L(FL("building verifier for %d-byte pub key\n") % pub_block.size());
shared_ptr x509_key =
- shared_ptr(X509::load_key(pub_block));
+ shared_ptr(Botan::X509::load_key(pub_block));
pub_key = shared_dynamic_cast(x509_key);
if (!pub_key)
throw informative_failure("Failed to get RSA verifying key");
@@ -429,7 +441,7 @@
SecureVector pub_block;
pub_block.set(reinterpret_cast(pub().data()), pub().size());
- shared_ptr x509_key = shared_ptr(X509::load_key(pub_block));
+ shared_ptr x509_key = shared_ptr(Botan::X509::load_key(pub_block));
shared_ptr pub_key = shared_dynamic_cast(x509_key);
if (!pub_key)
throw informative_failure("Failed to get RSA encrypting key");
============================================================
--- restrictions.cc 8a45208f6fdad11caf24a17aa2e05b908135a357
+++ restrictions.cc d7c60923a328aefb9a8429ecb6654586ce31a3f9
@@ -13,7 +13,9 @@
#include "transforms.hh"
using std::make_pair;
+using std::map;
using std::set;
+using std::vector;
// TODO: add check for relevant rosters to be used by log
//
============================================================
--- restrictions.hh de2f4620c0e8ca01eebfb919b0735e6e4182bb14
+++ restrictions.hh 797c6f69647ff3a63870f7870b88353840cf9200
@@ -28,9 +28,6 @@
#include "roster.hh"
#include "vocab.hh"
-using std::map;
-using std::vector;
-
// between any two related revisions, A and B, there is a set of changes (a
// cset) that describes the operations required to get from A to B. for example:
//
@@ -57,8 +54,8 @@
public:
restriction(app_state & a) : app(a) {}
- restriction(vector const & includes,
- vector const & excludes,
+ restriction(std::vector const & includes,
+ std::vector const & excludes,
roster_t const & roster,
app_state & a) :
app(a)
@@ -68,8 +65,8 @@
validate();
}
- restriction(vector const & includes,
- vector const & excludes,
+ restriction(std::vector const & includes,
+ std::vector const & excludes,
roster_t const & roster1,
roster_t const & roster2,
app_state & a) :
@@ -105,11 +102,11 @@
// we maintain maps by node_id and also by split_path, which is not
// particularly nice, but paths are required for checking unknown and ignored
// files
- map node_map;
- map path_map;
+ std::map node_map;
+ std::map path_map;
- void map_paths(vector const & includes,
- vector const & excludes);
+ void map_paths(std::vector const & includes,
+ std::vector const & excludes);
void map_nodes(roster_t const & roster);
============================================================
--- revision.cc ef6feacfdac32584040843bcd70f3bb66df67ad7
+++ revision.cc 8b358213321192d8a1f65992915ed1b20dd2cbbe
@@ -56,6 +56,9 @@
using std::string;
using std::vector;
+using boost::dynamic_bitset;
+using boost::shared_ptr;
+
void revision_set::check_sane() const
{
// null id in current manifest only permitted if previous
@@ -149,8 +152,8 @@
// even longer.
typedef unsigned long ctx;
-typedef boost::dynamic_bitset<> bitmap;
-typedef boost::shared_ptr shared_bitmap;
+typedef dynamic_bitset<> bitmap;
+typedef shared_ptr shared_bitmap;
static void
calculate_ancestors_from_graph(interner & intern,
@@ -553,7 +556,7 @@
roster_t const & new_roster,
revision_set & rev)
{
- boost::shared_ptr cs(new cset());
+ shared_ptr cs(new cset());
rev.edges.clear();
make_cset(old_roster, new_roster, *cs);
@@ -568,10 +571,7 @@
// Stuff related to rebuilding the revision graph. Unfortunately this is a
// real enough error case that we need support code for it.
-typedef map,
- boost::shared_ptr
- > >
+typedef map, shared_ptr > >
parent_roster_map;
template <> void
@@ -902,7 +902,7 @@
for (parent_roster_map::const_iterator r = parent_rosters.begin();
r != parent_rosters.end(); ++r)
{
- boost::shared_ptr parent = r->second.first;
+ shared_ptr parent = r->second.first;
// L(FL("node %d %s in parent roster %d\n")
// % nid
// % (parent->has_node(n->first) ? "exists" : "does not exist" )
@@ -1049,8 +1049,8 @@
for (parent_roster_map::const_iterator i = parent_rosters.begin();
i != parent_rosters.end(); ++i)
{
- boost::shared_ptr parent_roster = i->second.first;
- boost::shared_ptr parent_marking = i->second.second;
+ shared_ptr parent_roster = i->second.first;
+ shared_ptr parent_marking = i->second.second;
node_map const & nodes = parent_roster->all_nodes();
for (node_map::const_iterator j = nodes.begin(); j != nodes.end(); ++j)
@@ -1083,7 +1083,7 @@
for (parent_roster_map::const_iterator j = parent_rosters.begin();
j != parent_rosters.end(); ++j)
{
- boost::shared_ptr parent_roster = j->second.first;
+ shared_ptr parent_roster = j->second.first;
if (!parent_roster->has_node(n))
continue;
@@ -1237,8 +1237,8 @@
u64 parent = i->second;
if (parent_rosters.find(parent) == parent_rosters.end())
{
- boost::shared_ptr ros = boost::shared_ptr(new roster_t());
- boost::shared_ptr mm = boost::shared_ptr(new marking_map());
+ shared_ptr ros = shared_ptr(new roster_t());
+ shared_ptr mm = shared_ptr(new marking_map());
app.db.get_roster(safe_get(node_to_new_rev, parent), *ros, *mm);
safe_insert(parent_rosters, make_pair(parent, make_pair(ros, mm)));
}
@@ -1333,8 +1333,8 @@
{
u64 parent = i->first;
revision_id parent_rid = safe_get(node_to_new_rev, parent);
- boost::shared_ptr parent_roster = i->second.first;
- boost::shared_ptr cs = boost::shared_ptr(new cset());
+ shared_ptr parent_roster = i->second.first;
+ shared_ptr cs = shared_ptr(new cset());
MM(*cs);
make_cset(*parent_roster, child_roster, *cs);
safe_insert(rev.edges, make_pair(parent_rid, cs));
@@ -1348,8 +1348,8 @@
if (rev.edges.empty())
{
revision_id parent_rid;
- boost::shared_ptr parent_roster = boost::shared_ptr(new roster_t());
- boost::shared_ptr cs = boost::shared_ptr(new cset());
+ shared_ptr parent_roster = shared_ptr(new roster_t());
+ shared_ptr cs = shared_ptr(new cset());
MM(*cs);
make_cset(*parent_roster, child_roster, *cs);
safe_insert(rev.edges, make_pair (parent_rid, cs));
@@ -1549,7 +1549,7 @@
parse_edge(basic_io::parser & parser,
edge_map & es)
{
- boost::shared_ptr cs(new cset());
+ shared_ptr cs(new cset());
MM(*cs);
manifest_id old_man;
revision_id old_rev;
============================================================
--- schema_migration.cc e26608a79f5d7cef3cc41da156dfc6d5f5f840db
+++ schema_migration.cc 3b14626a3cf5917254ec38dc54edd63b03a2c6f2
@@ -22,8 +22,16 @@
#include "keys.hh"
#include "transforms.hh"
+using std::ctype;
+using std::locale;
+using std::map;
+using std::pair;
using std::string;
+using std::use_facet;
+using std::vector;
+using boost::char_separator;
+
// this file knows how to migrate schema databases. the general strategy is
// to hash each schema we ever use, and make a list of the SQL commands
// required to get from one hash value to the next. when you do a
@@ -39,8 +47,6 @@
// remains. if it becomes a maintainence burden, however, consider
// refactoring.
-using namespace std;
-
static int logged_sqlite3_exec(sqlite3* db,
const char* sql,
sqlite3_callback cb,
@@ -55,7 +61,7 @@
return res;
}
-typedef boost::tokenizer > tokenizer;
+typedef boost::tokenizer > tokenizer;
static string
lowercase_facet(string const & in)
@@ -73,7 +79,7 @@
massage_sql_tokens(string const & in,
string & out)
{
- boost::char_separator sep(" \r\n\t", "(),;");
+ char_separator sep(" \r\n\t", "(),;");
tokenizer tokens(in, sep);
out.clear();
for (tokenizer::iterator i = tokens.begin();
============================================================
--- string_queue.cc 8e101f4569d10559b9bcac8b08677d5332e96ac1
+++ string_queue.cc 06e46ddd188c16242e046af4cfaea6556d381393
@@ -1,16 +1,16 @@
// unit tests for string_queue
#include
#include "string_queue.hh"
-using namespace std;
-
#ifdef BUILD_UNIT_TESTS
#include
#include "unit_tests.hh"
+using std::logic_error;
+
void
test_string_queue()
{
============================================================
--- transforms.cc 9e1877e1127950f7a5a00e3eb1b2e8a90aa8d4aa
+++ transforms.cc a4754b188afa931450b7dc5b49d077a5a39e8073
@@ -28,8 +28,10 @@
#include "vocab.hh"
#include "xdelta.hh"
-using namespace std;
+using std::string;
+using boost::scoped_array;
+
// this file contans various sorts of string transformations. each
// transformation should be self-explanatory from its type signature. see
// transforms.hh for the summary.
@@ -55,8 +57,6 @@
// paradigm "must" be used. this program is intended for source code
// control and I make no bones about it.
-using namespace std;
-
// the generic function
template string xform(string const & in)
{
@@ -101,7 +101,7 @@
}
else
{
- boost::scoped_array buf(new char[in.size() * 2]);
+ scoped_array buf(new char[in.size() * 2]);
encode_hexenc_inner(in.begin(), in.end(), buf.get());
return string(buf.get(), in.size() *2);
}
@@ -145,7 +145,7 @@
}
else
{
- boost::scoped_array buf(new char[in.size() / 2]);
+ scoped_array buf(new char[in.size() / 2]);
decode_hexenc_inner(in.begin(), in.end(), buf.get());
return string(buf.get(), in.size() / 2);
}
============================================================
--- txt2c.cc af464696310692534add8c0ac8e078b622b98630
+++ txt2c.cc 85a07a8bc034fbd6be456d6d5028ba26f362303a
@@ -1,8 +1,13 @@
#include
#include
#include
-using namespace std;
+using std::cerr;
+using std::cout;
+using std::endl;
+using std::ifstream;
+using std::string;
+
int main(int argc, char **argv)
{
if (argc < 3 || argc > 5)
============================================================
--- update.cc 2e6155771b60acaa2b08ec72951cad1ee55d68f8
+++ update.cc a6ab1750719839bd9da8ac0db8c9181b60167890
@@ -39,9 +39,12 @@
// it may be somewhat inefficient to use erase_ancestors here, but deal with
// that when and if the time comes...
-using boost::lexical_cast;
+using std::make_pair;
+using std::map;
+using std::set;
+using std::vector;
-using namespace std;
+using boost::lexical_cast;
static void
get_test_results_for_revision(revision_id const & id,
============================================================
--- work.cc 741e5e93dd1fffecaabdeb5e59b8cd7d76f52404
+++ work.cc 9e2f2b5bf64d0d0b40ce813e21cfd194cdca64d0
@@ -32,6 +32,8 @@
using std::string;
using std::vector;
+using boost::lexical_cast;
+
// workspace / book-keeping file code
static string const attr_file_name(".mt-attrs");
@@ -869,7 +871,7 @@
static inline bookkeeping_path
path_for_nid(node_id nid)
{
- return bookkeeping_root / "tmp" / boost::lexical_cast(nid);
+ return bookkeeping_root / "tmp" / lexical_cast(nid);
}
// Attaching/detaching the root directory:
============================================================
--- xdelta.cc d884013d3dc309f7dfa6f3d4541adb2ba3ef981e
+++ xdelta.cc 257b87980b8477f0b2ffe1f4158efcd1866b38a4
@@ -44,6 +44,8 @@
using std::string;
using std::vector;
+using boost::shared_ptr;
+
struct identity {size_t operator()(u32 const & v) const { return static_cast(v);}};
typedef pair extent;
typedef hashmap::hash_map match_table;
@@ -346,7 +348,7 @@
}
void
-apply_delta(boost::shared_ptr da,
+apply_delta(shared_ptr da,
string const & delta)
{
string::const_iterator i = delta.begin();
@@ -392,7 +394,7 @@
string const & delta,
string & b)
{
- boost::shared_ptr da(new simple_applicator());
+ shared_ptr da(new simple_applicator());
da->begin(a);
apply_delta(da, delta);
da->next();
@@ -421,7 +423,7 @@
measure_delta_target_size(string const & delta)
{
u64 sz = 0;
- boost::shared_ptr da(new size_accumulating_delta_applicator(sz));
+ shared_ptr da(new size_accumulating_delta_applicator(sz));
apply_delta(da, delta);
return sz;
}
@@ -602,8 +604,8 @@
: public delta_applicator
{
piece_table pt;
- boost::shared_ptr src;
- boost::shared_ptr dst;
+ shared_ptr src;
+ shared_ptr dst;
piecewise_applicator() :
src(new version_spec()),
@@ -647,16 +649,16 @@
// these just hide our implementation types from outside
-boost::shared_ptr
+shared_ptr
new_simple_applicator()
{
- return boost::shared_ptr(new simple_applicator());
+ return shared_ptr(new simple_applicator());
}
-boost::shared_ptr
+shared_ptr
new_piecewise_applicator()
{
- return boost::shared_ptr(new piecewise_applicator());
+ return shared_ptr(new piecewise_applicator());
}
@@ -765,7 +767,7 @@
string const & delta,
string & delta_inverse)
{
- boost::shared_ptr da(new inverse_delta_writing_applicator(old_str));
+ shared_ptr da(new inverse_delta_writing_applicator(old_str));
apply_delta(da, delta);
da->finish(delta_inverse);
}