Fix hg clone race with writer
Most read operations in hg don't need locks because we order reads and
writes for consistency. Clone is an exception to this as we're copying
entire file histories and could end up with more file history copied
than we have commits.
For now, make clone take a lock on the source repo. Non-hardlinked
clone should eventually be changed to use lockless pull.
+ hg clone a b
abort: repository a/.hg not found!
255
+ hg clone http://127.0.0.1:3121/a b
requesting all changes
abort: error: Connection refused
255
+ hg clone a b
abort: repository a/.hg not found!
255
+ hg init
+ hg clone . ../a
abort: destination '../a' already exists
1
+ hg clone a b
abort: repository a/.hg not found!
255
+ hg init
+ hg clone q
abort: destination 'q' already exists