##// END OF EJS Templates
lfs: take lock before writing requirements...
marmoute -
r49509:bf424fe4 default
parent child Browse files
Show More
@@ -257,6 +257,7 b' def _reposetup(ui, repo):'
257 if b'lfs' not in repo.requirements:
257 if b'lfs' not in repo.requirements:
258
258
259 def checkrequireslfs(ui, repo, **kwargs):
259 def checkrequireslfs(ui, repo, **kwargs):
260 with repo.lock():
260 if b'lfs' in repo.requirements:
261 if b'lfs' in repo.requirements:
261 return 0
262 return 0
262
263
@@ -269,7 +270,9 b' def _reposetup(ui, repo):'
269 for ctx in s:
270 for ctx in s:
270 # TODO: is there a way to just walk the files in the commit?
271 # TODO: is there a way to just walk the files in the commit?
271 if any(
272 if any(
272 ctx[f].islfs() for f in ctx.files() if f in ctx and match(f)
273 ctx[f].islfs()
274 for f in ctx.files()
275 if f in ctx and match(f)
273 ):
276 ):
274 repo.requirements.add(b'lfs')
277 repo.requirements.add(b'lfs')
275 repo.features.add(repository.REPO_FEATURE_LFS)
278 repo.features.add(repository.REPO_FEATURE_LFS)
General Comments 0
You need to be logged in to leave comments. Login now