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 init
+ hg add a
+ hg commit -m test -d 0 0
+ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
+ hg parents
changeset: 0:acb14030fe0a
tag: tip
user: test
date: Thu Jan 1 00:00:00 1970
summary: test
+ hg status
+ hg undo
rolling back last transaction
+ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
+ hg parents
+ hg status
A a