forked from mongodb/mongo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The addition of some (ok, a lot of) comments into shell/servers.js made the processed file shell/mongo-server.cpp contain a string constant longer than 65536 characters, and this made it not compile in MSVC any more (scons or Visual Studio). This commit breaks the file into smaller sections, somewhat logically grouped, and feeds them to the JavaScript engine in the same order as before (so it shouldn't break anything). No code was added or removed other than to restore Randolph's comments, and nothing was rearranged other than the disassembly into separate source files, with resulting separate string constants.
- Loading branch information
Tad Marshall
committed
Apr 12, 2012
1 parent
892331f
commit 869e8b4
Showing
10 changed files
with
2,276 additions
and
2,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ReplSetBridge = function(rst, from, to) { | ||
var n = rst.nodes.length; | ||
|
||
var startPort = rst.startPort+n; | ||
this.port = (startPort+(from*n+to)); | ||
this.host = rst.host+":"+this.port; | ||
|
||
this.dest = rst.host+":"+rst.ports[to]; | ||
this.start(); | ||
}; | ||
|
||
ReplSetBridge.prototype.start = function() { | ||
var args = ["mongobridge", "--port", this.port, "--dest", this.dest]; | ||
print("ReplSetBridge starting: "+tojson(args)); | ||
this.bridge = startMongoProgram.apply( null , args ); | ||
print("ReplSetBridge started " + this.bridge); | ||
}; | ||
|
||
ReplSetBridge.prototype.stop = function() { | ||
print("ReplSetBridge stopping: " + this.port); | ||
stopMongod(this.port, 9); | ||
}; | ||
|
||
ReplSetBridge.prototype.toString = function() { | ||
return this.host+" -> "+this.dest; | ||
}; |
Oops, something went wrong.