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