Show More
@@ -542,14 +542,17 b' def onetimeclientsetup(ui):' | |||
|
542 | 542 | |
|
543 | 543 | # close cache miss server connection after the command has finished |
|
544 | 544 | def runcommand(orig, lui, repo, *args, **kwargs): |
|
545 | fileservice = None | |
|
546 | # repo can be None when running in chg: | |
|
547 | # - at startup, reposetup was called because serve is not norepo | |
|
548 | # - a norepo command like "help" is called | |
|
549 | if repo and isenabled(repo): | |
|
550 | fileservice = repo.fileservice | |
|
545 | 551 | try: |
|
546 | 552 | return orig(lui, repo, *args, **kwargs) |
|
547 | 553 | finally: |
|
548 | # repo can be None when running in chg: | |
|
549 | # - at startup, reposetup was called because serve is not norepo | |
|
550 | # - a norepo command like "help" is called | |
|
551 | if repo and isenabled(repo): | |
|
552 | repo.fileservice.close() | |
|
554 | if fileservice: | |
|
555 | fileservice.close() | |
|
553 | 556 | extensions.wrapfunction(dispatch, 'runcommand', runcommand) |
|
554 | 557 | |
|
555 | 558 | # disappointing hacks below |
General Comments 0
You need to be logged in to leave comments.
Login now