summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2012-04-10 09:25:54 -0700
committerAaron <aaron@10gen.com>2012-04-10 20:21:56 -0700
commitab23ff16425d04ef26b23a710825c38c9e4ad428 (patch)
tree8a804ba624fd564d753c34c40dc1a24351cf5d19 /src/mongo
parent0907e792cf1450659dc37d09a835fb41587c0217 (diff)
downloadmongo-ab23ff16425d04ef26b23a710825c38c9e4ad428.tar.gz
Rename namespace shellUtils to shell_utils.
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/client/clientAndShell.cpp4
-rw-r--r--src/mongo/client/clientOnly-private.h2
-rw-r--r--src/mongo/shell/dbshell.cpp26
-rw-r--r--src/mongo/shell/shell_utils.cpp4
-rw-r--r--src/mongo/shell/shell_utils.h2
-rw-r--r--src/mongo/shell/shell_utils_extended.cpp2
-rw-r--r--src/mongo/shell/shell_utils_extended.h2
-rw-r--r--src/mongo/shell/shell_utils_launcher.cpp2
-rw-r--r--src/mongo/shell/shell_utils_launcher.h2
9 files changed, 23 insertions, 23 deletions
diff --git a/src/mongo/client/clientAndShell.cpp b/src/mongo/client/clientAndShell.cpp
index f98031fa89f..56501279fbc 100644
--- a/src/mongo/client/clientAndShell.cpp
+++ b/src/mongo/client/clientAndShell.cpp
@@ -32,7 +32,7 @@ namespace mongo {
// This mutex helps the shell serialize output on exit,
// to avoid deadlocks at shutdown. So it also protects
// the global dbexitCalled.
- namespace shellUtils {
+ namespace shell_utils {
mongo::mutex &mongoProgramOutputMutex(*(new mongo::mutex("mongoProgramOutputMutex")));
}
@@ -42,7 +42,7 @@ namespace mongo {
void dbexit( ExitCode returnCode, const char *whyMsg , bool tryToGetLock ) {
{
- mongo::mutex::scoped_lock lk( shellUtils::mongoProgramOutputMutex );
+ mongo::mutex::scoped_lock lk( shell_utils::mongoProgramOutputMutex );
dbexitCalled = true;
}
out() << "dbexit called" << endl;
diff --git a/src/mongo/client/clientOnly-private.h b/src/mongo/client/clientOnly-private.h
index fc793894352..edec097dd20 100644
--- a/src/mongo/client/clientOnly-private.h
+++ b/src/mongo/client/clientOnly-private.h
@@ -1,7 +1,7 @@
#pragma once
#include "db/mongomutex.h"
namespace mongo {
- namespace shellUtils {
+ namespace shell_utils {
extern mongo::mutex &mongoProgramOutputMutex;
}
}
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp
index 2475d613cd2..02d48d129e0 100644
--- a/src/mongo/shell/dbshell.cpp
+++ b/src/mongo/shell/dbshell.cpp
@@ -88,7 +88,7 @@ void completionHook( const char* text , linenoiseCompletions* lc ) {
void shellHistoryInit() {
stringstream ss;
- const char * h = shellUtils::getUserDir();
+ const char * h = shell_utils::getUserDir();
if ( h )
ss << h << "/";
ss << ".dbshell";
@@ -126,7 +126,7 @@ void intr( int sig ) {
#endif
void killOps() {
- if ( mongo::shellUtils::_nokillop )
+ if ( mongo::shell_utils::_nokillop )
return;
if ( atPrompt )
@@ -134,7 +134,7 @@ void killOps() {
sleepmillis(10); // give current op a chance to finish
- mongo::shellUtils::connectionRegistry.killOperationsOnAllConnections( !autoKillOp );
+ mongo::shell_utils::connectionRegistry.killOperationsOnAllConnections( !autoKillOp );
}
void quitNicely( int sig ) {
@@ -205,7 +205,7 @@ void quitAbruptly( int sig ) {
mongo::printStackTrace( ossBt );
mongo::rawOut( ossBt.str() );
- mongo::shellUtils::KillMongoProgramInstances();
+ mongo::shell_utils::KillMongoProgramInstances();
exit( 14 );
}
@@ -570,7 +570,7 @@ int _main( int argc, char* argv[] ) {
mongo::isShell = true;
setupSignals();
- mongo::shellUtils::RecordMyLocation( argv[ 0 ] );
+ mongo::shell_utils::RecordMyLocation( argv[ 0 ] );
string url = "test";
string dbhost;
@@ -682,7 +682,7 @@ int _main( int argc, char* argv[] ) {
}
#endif
if ( params.count( "nokillop" ) ) {
- mongo::shellUtils::_nokillop = true;
+ mongo::shell_utils::_nokillop = true;
}
if ( params.count( "autokillop" ) ) {
autoKillOp = true;
@@ -737,7 +737,7 @@ int _main( int argc, char* argv[] ) {
ss << "__quiet = true;";
ss << "db = connect( \"" << fixHost( url , dbhost , port ) << "\")";
- mongo::shellUtils::_dbConnect = ss.str();
+ mongo::shell_utils::_dbConnect = ss.str();
if ( params.count( "password" ) && password.empty() )
password = mongo::askPassword();
@@ -745,13 +745,13 @@ int _main( int argc, char* argv[] ) {
if ( username.size() && password.size() ) {
stringstream ss;
ss << "if ( ! db.auth( \"" << username << "\" , \"" << password << "\" ) ){ throw 'login failed'; }";
- mongo::shellUtils::_dbAuth = ss.str();
+ mongo::shell_utils::_dbAuth = ss.str();
}
}
- mongo::ScriptEngine::setConnectCallback( mongo::shellUtils::onConnect );
+ mongo::ScriptEngine::setConnectCallback( mongo::shell_utils::onConnect );
mongo::ScriptEngine::setup();
- mongo::globalScriptEngine->setScopeInitCallback( mongo::shellUtils::initScope );
+ mongo::globalScriptEngine->setScopeInitCallback( mongo::shell_utils::initScope );
auto_ptr< mongo::Scope > scope( mongo::globalScriptEngine->newScope() );
shellMainScope = scope.get();
@@ -759,13 +759,13 @@ int _main( int argc, char* argv[] ) {
cout << "type \"help\" for help" << endl;
if ( !script.empty() ) {
- mongo::shellUtils::MongoProgramScope s;
+ mongo::shell_utils::MongoProgramScope s;
if ( ! scope->exec( script , "(shell eval)" , true , true , false ) )
return -4;
}
for (size_t i = 0; i < files.size(); ++i) {
- mongo::shellUtils::MongoProgramScope s;
+ mongo::shell_utils::MongoProgramScope s;
if ( files.size() > 1 )
cout << "loading file: " << files[i] << endl;
@@ -781,7 +781,7 @@ int _main( int argc, char* argv[] ) {
if ( runShell ) {
- mongo::shellUtils::MongoProgramScope s;
+ mongo::shell_utils::MongoProgramScope s;
if ( !norc ) {
string rcLocation;
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp
index fedb34551ea..d7d18ad4d9d 100644
--- a/src/mongo/shell/shell_utils.cpp
+++ b/src/mongo/shell/shell_utils.cpp
@@ -30,7 +30,7 @@ namespace mongo {
extern const JSFile servers;
}
- namespace shellUtils {
+ namespace shell_utils {
std::string _dbConnect;
std::string _dbAuth;
@@ -136,7 +136,7 @@ namespace mongo {
void initScope( Scope &scope ) {
scope.externalSetup();
- mongo::shellUtils::installShellUtils( scope );
+ mongo::shell_utils::installShellUtils( scope );
scope.execSetup(JSFiles::servers);
if ( !_dbConnect.empty() ) {
diff --git a/src/mongo/shell/shell_utils.h b/src/mongo/shell/shell_utils.h
index e89ced9a84f..8c8d7de1542 100644
--- a/src/mongo/shell/shell_utils.h
+++ b/src/mongo/shell/shell_utils.h
@@ -25,7 +25,7 @@ namespace mongo {
class Scope;
class DBClientWithCommands;
- namespace shellUtils {
+ namespace shell_utils {
extern std::string _dbConnect;
extern std::string _dbAuth;
diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp
index 5d1ac3adfae..7e147b4eeeb 100644
--- a/src/mongo/shell/shell_utils_extended.cpp
+++ b/src/mongo/shell/shell_utils_extended.cpp
@@ -36,7 +36,7 @@ namespace mongo {
* identified by the caller. Dependent filesystem paths should not be accessed by different
* threads.
*/
- namespace shellUtils {
+ namespace shell_utils {
BSONObj listFiles(const BSONObj& _args, void* data) {
BSONObj cd = BSON( "0" << "." );
diff --git a/src/mongo/shell/shell_utils_extended.h b/src/mongo/shell/shell_utils_extended.h
index ba1211ebaf9..9ce6d1eb600 100644
--- a/src/mongo/shell/shell_utils_extended.h
+++ b/src/mongo/shell/shell_utils_extended.h
@@ -22,7 +22,7 @@ namespace mongo {
class Scope;
- namespace shellUtils {
+ namespace shell_utils {
void installShellUtilsExtended( Scope& scope );
}
}
diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp
index 5435885232f..d3edd24c33b 100644
--- a/src/mongo/shell/shell_utils_launcher.cpp
+++ b/src/mongo/shell/shell_utils_launcher.cpp
@@ -53,7 +53,7 @@ namespace mongo {
* by different threads. Dependent filesystem paths should not be accessed by different
* threads.
*/
- namespace shellUtils {
+ namespace shell_utils {
ProgramOutputMultiplexer programOutputLogger;
diff --git a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h
index f563015cddf..7eda4cd78d5 100644
--- a/src/mongo/shell/shell_utils_launcher.h
+++ b/src/mongo/shell/shell_utils_launcher.h
@@ -25,7 +25,7 @@ namespace mongo {
class Scope;
- namespace shellUtils {
+ namespace shell_utils {
// Scoped management of mongo program instances. Simple implementation:
// destructor kills all mongod instances created by the shell.