# HG changeset patch # User Matt Mackall # Date 1407696816 18000 # Node ID af62f0280a76d15a1bbc7c07817b73952b23117c # Parent 68f2f8bfe9ae7e36c68d588adad26d3df23e3601 hgweb: avoid config object race with hgwebdir (issue4326) Turns out hgwebdir passes full repo objects to each hgweb request instance, but with a shared baseui. We explicitly break the sharing. diff -r 68f2f8bfe9ae -r af62f0280a76 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sat Aug 09 16:15:52 2014 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Sun Aug 10 13:53:36 2014 -0500 @@ -61,6 +61,7 @@ u = ui.ui() r = hg.repository(u, repo) else: + # we trust caller to give us a private copy r = repo r = self._getview(r) diff -r 68f2f8bfe9ae -r af62f0280a76 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Sat Aug 09 16:15:52 2014 -0500 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Aug 10 13:53:36 2014 -0500 @@ -214,7 +214,8 @@ if real: req.env['REPO_NAME'] = virtualrepo try: - repo = hg.repository(self.ui, real) + # ensure caller gets private copy of ui + repo = hg.repository(self.ui.copy(), real) return hgweb(repo).run_wsgi(req) except IOError, inst: msg = inst.strerror