##// END OF EJS Templates
remotefilelog: avoid accessing repo instance after dispatch...
Martin von Zweigbergk -
r40611:157f0e29 default
parent child Browse files
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 try:
546 return orig(lui, repo, *args, **kwargs)
547 finally:
545 fileservice = None
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 repo.fileservice.close()
550 fileservice = repo.fileservice
551 try:
552 return orig(lui, repo, *args, **kwargs)
553 finally:
554 if fileservice:
555 fileservice.close()
553 556 extensions.wrapfunction(dispatch, 'runcommand', runcommand)
554 557
555 558 # disappointing hacks below
@@ -22,3 +22,4 b''
22 22 $ hg share source dest
23 23 updating working directory
24 24 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 $ hg -R dest unshare
General Comments 0
You need to be logged in to leave comments. Login now