[Updated] D8952: remotefilelog: acquire lock before writing requirements on clone
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Fri Sep 18 02:04:32 UTC 2020
Closed by commit rHGbddc4f2ef317: remotefilelog: acquire lock before writing requirements on clone (authored by pulkit).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8952?vs=22449&id=22689
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8952/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8952
AFFECTED FILES
hgext/remotefilelog/__init__.py
CHANGE DETAILS
diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -362,7 +362,10 @@
self.unfiltered().__class__,
)
self.requirements.add(constants.SHALLOWREPO_REQUIREMENT)
- scmutil.writereporequirements(self)
+ with self.lock():
+ # acquire store lock before writing requirements as some
+ # requirements might be written to .hg/store/requires
+ scmutil.writereporequirements(self)
# Since setupclient hadn't been called, exchange.pull was not
# wrapped. So we need to manually invoke our version of it.
To: pulkit, #hg-reviewers, marmoute, indygreg
Cc: durin42, martinvonz, indygreg, marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200918/5659be5e/attachment-0002.html>
More information about the Mercurial-patches
mailing list