# HG changeset patch # User Pierre-Yves David # Date 1493744167 -7200 # Node ID 2b6692df1bdfcdab8014f5cb34d7e5c59a5a17ab # Parent ccef71de7d41295c657d783e9caa7567d36fa529 caches: stop warming the cache after 'localrepo.commitctx' Now that we garantee that branchmap cache are updated at the end of the transaction we can drop that one. This removes a problematic case with nested transaction where the new cache could be written on disk before the transaction is finished. The test change is harmless, since we update the cache at a later point, the dirstate have been updated in between. diff -r ccef71de7d41 -r 2b6692df1bdf mercurial/localrepo.py --- a/mercurial/localrepo.py Tue May 02 21:35:06 2017 +0200 +++ b/mercurial/localrepo.py Tue May 02 18:56:07 2017 +0200 @@ -1794,7 +1794,6 @@ # if minimal phase was 0 we don't need to retract anything phases.retractboundary(self, tr, targetphase, [n]) tr.close() - branchmap.updatecache(self.filtered('served')) return n finally: if tr: diff -r ccef71de7d41 -r 2b6692df1bdf tests/test-blackbox.t --- a/tests/test-blackbox.t Tue May 02 21:35:06 2017 +0200 +++ b/tests/test-blackbox.t Tue May 02 18:56:07 2017 +0200 @@ -195,8 +195,8 @@ result: None $ hg blackbox 1970/01/01 00:00:00 bob @0e46349438790c460c5c9f7546bfcd39b267bbd2 (5000)> commit -m commit2 -d 2000-01-02 foo - 1970/01/01 00:00:00 bob @0e46349438790c460c5c9f7546bfcd39b267bbd2 (5000)> updated served branch cache in * seconds (glob) - 1970/01/01 00:00:00 bob @0e46349438790c460c5c9f7546bfcd39b267bbd2 (5000)> wrote served branch cache with 1 labels and 1 nodes + 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updated served branch cache in * seconds (glob) + 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> wrote served branch cache with 1 labels and 1 nodes 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> commit -m commit2 -d 2000-01-02 foo exited 0 after * seconds (glob) 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> log -r 0 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> writing .hg/cache/tags2-visible with 0 tags