Wed, 26 Aug 2015 16:27:14 -0500 templater: add new docheader/footer components for XML (issue4135)
Matt Mackall <mpm@selenic.com> [Wed, 26 Aug 2015 16:27:14 -0500] rev 26222
templater: add new docheader/footer components for XML (issue4135) The existing header/footer components were templated per-changeset, and thus couldn't be correctly printed for an empty log
Thu, 10 Sep 2015 09:52:17 -0400 import-checker: use modern .endswith for multiple suffixes
Augie Fackler <augie@google.com> [Thu, 10 Sep 2015 09:52:17 -0400] rev 26221
import-checker: use modern .endswith for multiple suffixes Suggested by Anton Shestakov <engored@ya.ru> on the list. Thanks!
Sat, 22 Aug 2015 18:43:24 -0700 hgweb: use separate repo instances per thread
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 18:43:24 -0700] rev 26220
hgweb: use separate repo instances per thread Before this change, multiple threads/requests could share a localrepository instance. This meant that all of localrepository needed to be thread safe. Many bugs have been reported telling us that localrepository isn't actually thread safe. While making localrepository thread safe is a noble cause, it is a lot of work. And there is little gain from doing so. Due to Python's GIL, only 1 thread may be processing Python code at a time. The benefits to multi-threaded servers are marginal. Thread safety would be a lot of work for little gain. So, we're not going to even attempt it. This patch establishes a pool of repos in hgweb. When a request arrives, we obtain the most recently used repository from the pool or create a new one if none is available. When the request has finished, we put that repo back in the pool. We start with a pool size of 1. For servers using a single thread, the pool will only ever be of size 1. For multi-threaded servers, the pool size will grow to the max number of simultaneous requests the server processes. No logic for pruning the pool has been implemented. We assume server operators either limit the number of threads to something they can handle or restart the Mercurial process after a certain amount of requests or time has passed.
Sat, 22 Aug 2015 18:54:34 -0700 hg: establish a cache for localrepository instances
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 18:54:34 -0700] rev 26219
hg: establish a cache for localrepository instances hgweb contained code for determining whether a cached localrepository instance was up to date. This code was way too low-level to be in hgweb. This functionality has been moved to a new "cachedlocalrepo" class in hg.py. The code has been changed slightly to facilitate use inside a class. hgweb has been refactored to use the new API. As part of this refactor, hgweb.repo no longer exists! We're very close to using a distinct repo instance per thread. The new cache records state when it is created. This intelligence prevents an extra localrepository from being created on the first hgweb request. This is why some redundant output from test-extension.t has gone away.
Sat, 22 Aug 2015 18:15:42 -0700 hgweb: create function to perform actions on new repo
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 18:15:42 -0700] rev 26218
hgweb: create function to perform actions on new repo We perform some common tasks when a new repo instance is obtained. In preparation for changing how we obtain repo instances, factor this functionality into a standalone function.
Sat, 22 Aug 2015 17:50:28 -0700 hgweb: remove proxy to hgweb instance
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 17:50:28 -0700] rev 26217
hgweb: remove proxy to hgweb instance We were temporarily routing attributes until all request-specific attributes from hgweb were moved to requestcontext. We have finally reached that juncture and we can remove the proxy. At this point, only the repo instance is prone to race conditions between threads. This will be dealt with shortly.
Thu, 10 Sep 2015 09:30:10 -0400 dispatch: disable demandimport when invoking the debugger
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 10 Sep 2015 09:30:10 -0400] rev 26216
dispatch: disable demandimport when invoking the debugger Turns out that demandimport confuses pudb, which does some pretty complicated imports. I think it's reasonable to disable demandimport here.
Wed, 09 Sep 2015 14:43:45 -0700 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com> [Wed, 09 Sep 2015 14:43:45 -0700] rev 26215
templater: create string unescape helper (issue4798) This gives us a unified place to do error-handling of string-escaping syntax errors
Sat, 05 Sep 2015 16:50:35 +0900 parsers: use PyTuple_New and SET_ITEM to construct metadata pair of markers
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Sep 2015 16:50:35 +0900] rev 26214
parsers: use PyTuple_New and SET_ITEM to construct metadata pair of markers With these 2 patches, fm1readmarkers() gets slightly faster: obsolete._fm1readmarkers() for 78644 entries 58.0 -> 56.2msec
Sat, 05 Sep 2015 16:41:21 +0900 parsers: use PyTuple_SET_ITEM() to fill new marker tuples
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Sep 2015 16:41:21 +0900] rev 26213
parsers: use PyTuple_SET_ITEM() to fill new marker tuples Because we know these tuples have no member yet, PyTuple_SetItem() isn't necessary.
Sat, 05 Sep 2015 12:56:53 +0900 revset: uncache filteredset.__contains__
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Sep 2015 12:56:53 +0900] rev 26212
revset: uncache filteredset.__contains__ Since 96b6b3d78697, condition function returns a cached value, so there's little benefit to cache __contains__. No measurable difference found in contrib/base-revsets.txt.
Sat, 22 Aug 2015 17:08:37 -0700 hgweb: assign ctype to requestcontext
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 17:08:37 -0700] rev 26211
hgweb: assign ctype to requestcontext The very existence of ctype is a bit hacky. But we roll with it. Before this patch, there was possibly a race condition between 2 threads handling file requests: 1 thread could set the ctype and another serving a different file would read and use that potentially wrong ctype.
Sat, 22 Aug 2015 17:04:24 -0700 hgweb: add reponame to requestcontext
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 17:04:24 -0700] rev 26210
hgweb: add reponame to requestcontext We have to use object.__setattr__ until the app proxy is gone.
Sat, 22 Aug 2015 16:54:52 -0700 hgweb: don't access self.repo during request processing
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 16:54:52 -0700] rev 26209
hgweb: don't access self.repo during request processing We want all repository accesses to go through requestcontext.repo so the request is isolated from the application.
(0) -10000 -3000 -1000 -300 -100 -14 +14 +100 +300 +1000 +3000 +10000 tip