##// END OF EJS Templates
with: use context manager for wlock in updatelfiles
Bryan O'Sullivan -
r27820:d2e9cc9e default
parent child Browse files
Show More
@@ -426,8 +426,7 b' def updatelfiles(ui, repo, filelist=None'
426 ignore, for false) message forcibly".
426 ignore, for false) message forcibly".
427 '''
427 '''
428 statuswriter = lfutil.getstatuswriter(ui, repo, printmessage)
428 statuswriter = lfutil.getstatuswriter(ui, repo, printmessage)
429 wlock = repo.wlock()
429 with repo.wlock():
430 try:
431 lfdirstate = lfutil.openlfdirstate(ui, repo)
430 lfdirstate = lfutil.openlfdirstate(ui, repo)
432 lfiles = set(lfutil.listlfiles(repo)) | set(lfdirstate)
431 lfiles = set(lfutil.listlfiles(repo)) | set(lfdirstate)
433
432
@@ -504,8 +503,6 b' def updatelfiles(ui, repo, filelist=None'
504 if lfiles:
503 if lfiles:
505 statuswriter(_('%d largefiles updated, %d removed\n') % (updated,
504 statuswriter(_('%d largefiles updated, %d removed\n') % (updated,
506 removed))
505 removed))
507 finally:
508 wlock.release()
509
506
510 @command('lfpull',
507 @command('lfpull',
511 [('r', 'rev', [], _('pull largefiles for these revisions'))
508 [('r', 'rev', [], _('pull largefiles for these revisions'))
General Comments 0
You need to be logged in to leave comments. Login now