remotefilelog: acquire lock before writing requirements on clone
Performing a shallow clone in remotefilelog does not acquire lock. This leads to
following warning when we try to write some requirements in store:
```
--- /home/gps/src/hg-committed/tests/test-remotefilelog-share.t
+++ /home/gps/src/hg-committed/tests/test-remotefilelog-share.t#safe.err
@@ -28,6 +28,7 @@
$ hgcloneshallow ssh://user@dummy/master source --noupdate -q
+ devel-warn: write with no lock: "requires" at: /home/gps/src/hg-committed/mercurial/scmutil.py:1505 (writerequires)
$ hg share source dest
updating working directory
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
```
Let's lock before writing the requirements file.
Another solution which I can think of is not warn about missing lock when
writing to requires file in store.
Differential Revision: https://phab.mercurial-scm.org/D8952
{
// Enforcing
"eqeqeq" : true, // true: Require triple equals (===) for comparison
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
"freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
"nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
// Environments
"browser" : true // Web Browser (window, document, etc)
}