Skip to content
Snippets Groups Projects
Commit 09d6901c authored by Georges Racinet's avatar Georges Racinet
Browse files

load_repo: using a local variable before returning

This will make instrumentation for memory investigation
easier.
parent 1485c30a
No related branches found
No related tags found
2 merge requests!59Mitigate strongly memory leaks related to repository classes,!58server: mono-process mode
......@@ -71,8 +71,8 @@
# ensure caller gets private copy of ui
try:
return hg.repository(self.ui.copy(), repo_path)
repo = hg.repository(self.ui.copy(), repo_path)
except error.RepoError as exc:
context.set_code(StatusCode.NOT_FOUND)
context.set_details(repr(exc.args))
raise KeyError('repo', repo_path)
......@@ -75,4 +75,5 @@
except error.RepoError as exc:
context.set_code(StatusCode.NOT_FOUND)
context.set_details(repr(exc.args))
raise KeyError('repo', repo_path)
return repo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment