# HG changeset patch # User Pierre-Yves David # Date 1534450759 -7200 # Node ID a7794f5abacdc1824c47552ec27ef835a7cf65aa # Parent bfc617cd1ce12090d51e6104ccc191f93092ec10 discovery: make sure repository wrapping happens in the right order Otherwise we may end up in situation were cache are not warmed in the right order, crashing. diff -r bfc617cd1ce1 -r a7794f5abacd CHANGELOG --- a/CHANGELOG Thu Aug 16 11:54:30 2018 +0200 +++ b/CHANGELOG Thu Aug 16 22:19:19 2018 +0200 @@ -5,6 +5,7 @@ ------------------- * next: fix topic restriction when passing --evolve + * clone: fix possible crash when using clone bundle and forcing cache warming 8.1.0 -- 2018-08-03 ------------------- diff -r bfc617cd1ce1 -r a7794f5abacd hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Thu Aug 16 11:54:30 2018 +0200 +++ b/hgext3rd/evolve/obsdiscovery.py Thu Aug 16 22:19:19 2018 +0200 @@ -65,7 +65,6 @@ _calcsize = struct.calcsize eh = exthelper.exthelper() -eh.merge(stablerangecache.eh) obsexcmsg = utility.obsexcmsg # Config @@ -1003,3 +1002,6 @@ else: boundaries['common'] = [node.nullid] return boundaries + +# merge later for outer layer wrapping +eh.merge(stablerangecache.eh) diff -r bfc617cd1ce1 -r a7794f5abacd hgext3rd/evolve/stablerange.py --- a/hgext3rd/evolve/stablerange.py Thu Aug 16 11:54:30 2018 +0200 +++ b/hgext3rd/evolve/stablerange.py Thu Aug 16 22:19:19 2018 +0200 @@ -32,8 +32,6 @@ filterparents = utility.filterparents eh = exthelper.exthelper() -eh.merge(stablesort.eh) -eh.merge(firstmergecache.eh) ################################# @@ -864,3 +862,7 @@ top = (rangeid[0], globalindex) result.append(top) return result + +# merge later for outer layer wrapping +eh.merge(stablesort.eh) +eh.merge(firstmergecache.eh) diff -r bfc617cd1ce1 -r a7794f5abacd hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Thu Aug 16 11:54:30 2018 +0200 +++ b/hgext3rd/evolve/stablerangecache.py Thu Aug 16 22:19:19 2018 +0200 @@ -29,7 +29,6 @@ from mercurial.i18n import _ eh = exthelper.exthelper() -eh.merge(stablerange.eh) class stablerangeondiskbase(stablerange.stablerangecached, genericcaches.changelogsourcebase): @@ -391,3 +390,5 @@ return tr repo.__class__ = stablerangerepo + +eh.merge(stablerange.eh) diff -r bfc617cd1ce1 -r a7794f5abacd hgext3rd/evolve/stablesort.py --- a/hgext3rd/evolve/stablesort.py Thu Aug 16 11:54:30 2018 +0200 +++ b/hgext3rd/evolve/stablesort.py Thu Aug 16 22:19:19 2018 +0200 @@ -34,7 +34,6 @@ filterparents = utility.filterparents eh = exthelper.exthelper() -eh.merge(depthcache.eh) def _mergepoint_tie_breaker(repo): """the key use to tie break merge parent @@ -705,3 +704,6 @@ 'headcached': stablesort_mergepoint_head_cached, 'headondisk': stablesort_mergepoint_head_ondisk, } + +# merge last so that repo setup wrap after that one. +eh.merge(depthcache.eh) diff -r bfc617cd1ce1 -r a7794f5abacd tests/test-discovery-obshashrange.t --- a/tests/test-discovery-obshashrange.t Thu Aug 16 11:54:30 2018 +0200 +++ b/tests/test-discovery-obshashrange.t Thu Aug 16 22:19:19 2018 +0200 @@ -240,13 +240,13 @@ * @0000000000000000000000000000000000000000 (*)> strip detected, evo-ext-depthcache cache reset (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-depthcache in *.???? seconds (8r) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (8r) (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-depthcache in *.???? seconds (1r) (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (1r) (glob) * @0000000000000000000000000000000000000000 (*)> strip detected, evo-ext-firstmerge cache reset (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-firstmerge in *.???? seconds (9r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-depthcache in *.???? seconds (1r) (glob) * @0000000000000000000000000000000000000000 (*)> strip detected, evo-ext-stablesort cache reset (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablesort in *.???? seconds (9r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (1r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> obscache is out of date, falling back to slower obsstore version (glob) * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 2 nodes (glob) @@ -656,14 +656,14 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-stablerange-mergepoint cache reset (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-firstmerge cache reset (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-depthcache cache reset (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-depthcache in *.???? seconds (8r) (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (8r) (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-firstmerge cache reset (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-stablesort cache reset (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (8r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-stablerange-mergepoint cache reset (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (8r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated base branch cache in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote base branch cache with 1 labels and 2 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-obscache cache reset (glob) @@ -825,16 +825,16 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obscache cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (5r, 11o) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (3r, 0o) (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obshashrange cache reset (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-firstmerge cache reset (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-depthcache cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-depthcache in *.???? seconds (8r) (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-stablesort cache reset (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-stablesort in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-stablerange-mergepoint cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (8r) (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obshashrange cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 11o) (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-firstmerge cache reset (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-stablesort cache reset (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-stablesort in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated base branch cache in *.???? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote base branch cache with 1 labels and 1 nodes (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 3 incoming changes - new heads: 4de32a90b66c (glob)