##// 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 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
@@ -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