##// END OF EJS Templates
largefiles: take lock before writing requirements...
marmoute -
r49510:497c2655 default
parent child Browse files
Show More
@@ -455,11 +455,12 b' def reposetup(ui, repo):'
455 repo.prepushoutgoinghooks.add(b"largefiles", prepushoutgoinghook)
455 repo.prepushoutgoinghooks.add(b"largefiles", prepushoutgoinghook)
456
456
457 def checkrequireslfiles(ui, repo, **kwargs):
457 def checkrequireslfiles(ui, repo, **kwargs):
458 if b'largefiles' not in repo.requirements and any(
458 with repo.lock():
459 lfutil.shortname + b'/' in f[1] for f in repo.store.datafiles()
459 if b'largefiles' not in repo.requirements and any(
460 ):
460 lfutil.shortname + b'/' in f[1] for f in repo.store.datafiles()
461 repo.requirements.add(b'largefiles')
461 ):
462 scmutil.writereporequirements(repo)
462 repo.requirements.add(b'largefiles')
463 scmutil.writereporequirements(repo)
463
464
464 ui.setconfig(
465 ui.setconfig(
465 b'hooks', b'changegroup.lfiles', checkrequireslfiles, b'largefiles'
466 b'hooks', b'changegroup.lfiles', checkrequireslfiles, b'largefiles'
General Comments 0
You need to be logged in to leave comments. Login now