We no longer need mongo_vstudio.cpp and it is removed from the Git
repository with this commit. Visual Studio 2010 will now generate its
own copies of shell/mongo.cpp and shell/mongo-server.cpp. The code
that creates these files closely mimics the jsToH function in SConstruct
such that the resulting files are identical (quirks and all).
SConstruct no longer creates shell/mongo_vstudio.cpp and Visual Studio
creates and uses the same filename as SCons (shell/mongo.cpp). All
projects that were using mongo_vstudio.cpp will now instead generate
shell/mongo.cpp as a "Pre-Build" step.
ScopeGuard helps make writing RAII easier. You can avoid coding like this:
try {
inRepair(true);
function_that_might_throw();
inRepair(false);
}
catch(...) {
inRepair(false);
throw;
}
With scopeguard, the new code looks like this:
{
inRepair(true);
ON_BLOCK_EXIT(inRepair, false);
function_that_might_throw();
}
See the code comments for more details and examples.
Remove the duplicate db.getMongo().setSlaveOk() help line from db.help()
(I kept the one with the more terse text), remove an extraneous space
from the end of db.getProfilingStatus(), sort the lines alphabetically.
Add code to linenoise to do what readline was doing. When tab is
hit, we need to search backwards from the insertion point for a
break character (we're using " =+-/\\*?\"'`&<>;|@{([])}" for now)
and only pass the characters between that point and the cursor
position to the completion routine. When it gives us possible
completions, we need to insert them in place of the string we
extracted, which makes completion work when not at the left margin
and even when inside another expression. Linenoise was passing
the whole input line and substituting the replacement text for the
entire line.