We don't currently lock the repository for reading, so localrepository.lock() is
in effect a write lock.
This is fine in most cases, except the undo command. It locks the repository,
so it can't race with any writers. But it will race with all readers :-(
I don't think this has serious consequences. Corruption due to a race between
an outgoing pull and an undo should just result in the transaction rolling back
at the destination.
My vote would be to just document this race in the undo man page entry, and not
actually change the code (adding read locks would suck).
|