Fri, 28 Jul 2017 22:04:27 -0700 exchange: simplify unbundle locking using context managers
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 22:04:27 -0700] rev 33794
exchange: simplify unbundle locking using context managers Differential Revision: https://phab.mercurial-scm.org/D393
Fri, 28 Jul 2017 22:42:10 -0700 util: add base class for transactional context managers
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 22:42:10 -0700] rev 33793
util: add base class for transactional context managers We have at least three types with a close() and a release() method where the close() method is supposed to be called on success and the release() method is supposed to be called last, whether successful or not. Two of them (transaction and dirstateguard) already have identical implementations of __enter__ and __exit__. Let's extract a base class for this, so we reuse the code and so the third type (transactionmanager) can also be used as a context manager. Differential Revision: https://phab.mercurial-scm.org/D392
Mon, 14 Aug 2017 16:26:36 -0700 exchange: remove need for "locked" variable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 16:26:36 -0700] rev 33792
exchange: remove need for "locked" variable The transactionmanager() constructor just assigned a few variables and cannot fail, so it's safe to move it inside the earlier try/except. Differential Revision: https://phab.mercurial-scm.org/D391
Mon, 14 Aug 2017 16:14:14 -0700 exchange: drop now-unnecessary "local" from lock name variables
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 16:14:14 -0700] rev 33791
exchange: drop now-unnecessary "local" from lock name variables Since fda0867cfe03 (exchange: drop support for lock-based unbundling (BC), 2017-08-06), there is no more remote locking. Differential Revision: https://phab.mercurial-scm.org/D390
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -4 +4 +10 +30 +100 +300 +1000 +3000 +10000 tip