Restore workspace locking functionality.

It got lost during the merge.
Merge remote-tracking branch 'twitter/master'