go-mgo/mgo — pull request #41 by mpobrien (2014-10-29 13:51:33+00:00)
Title: add support for repairCursor command with test coverage

A new command called "repairCursor" was added to the server in 2.7.8 (see https://jira.mongodb.org/browse/SERVER-15544 for details). We need support for this in the mgo driver so that tools which involve database repair operations (like mongodump) can access it.
It's implemented as a command which returns a cursor; the server performs a best-effort attempt to recover any data from damaged data files and return the documents it finds on the cursor - so, it could potentially return multiple copies of the same document. I've written the test to account for this behavior.