# HG changeset patch # User Matt Harbison # Date 1608686561 18000 # Node ID b1e057fb7837b7277790d25eb701830a8874e4d1 # Parent 4737d3db16715795f94ef4aa0fe0386b97b94ffe topic: disable inmemory rebase to avoid losing the topic diff -r 4737d3db1671 -r b1e057fb7837 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Fri Nov 20 21:38:48 2020 +0100 +++ b/hgext3rd/topic/__init__.py Tue Dec 22 20:22:41 2020 -0500 @@ -435,6 +435,13 @@ repo.ui.setconfig(b'experimental', b'thg.displaynames', b'topics', source=b'topic-extension') + # BUG: inmemory rebase drops the topic, and fails to switch to the new + # topic. Disable inmemory rebase for now. + if repo.ui.configbool(b'rebase', b'experimental.inmemory'): + repo.ui.setconfig(b'rebase', b'experimental.inmemory', b'False', + source=b'topic-extension') + + class topicrepo(repo.__class__): # attribute for other code to distinct between repo with topic and repo without diff -r 4737d3db1671 -r b1e057fb7837 tests/test-topic-rebase.t --- a/tests/test-topic-rebase.t Fri Nov 20 21:38:48 2020 +0100 +++ b/tests/test-topic-rebase.t Tue Dec 22 20:22:41 2020 -0500 @@ -166,3 +166,30 @@ ### target: default (branch) s1@ myotherfeature1 (current) s0^ default3 (base) + +inmemory rebase currently drops the topic. + +BUG: inmemory rebase currently drops the topic. This is the correct output +because of there's a config override. + + $ echo x > a.txt + $ hg ci -Aqm x + $ hg rebase -r . -d 3 --config rebase.experimental.inmemory=1 + rebasing 8:1323571d782d "x" (tip myotherfeature) + switching to topic myfeature + switching to topic myotherfeature + $ logtopic + @ 9:42f2e003a46e77e1b33da4434c2689722b976b73 + | topics: myotherfeature + | o 7:6ccb9ec4913b64f3ad719ff1ba66495a70bf35a4 + | | topics: myotherfeature + | o 6:0b124ef641a7a6f4715d962650d3b367e8c800be + | | topics: + | o 4:0cd2e1a45ac4e3f9603a05ccfa6d1c70cd759bc5 + |/ topics: + o 3:fc6593661cf3256ba165cbccd6019ead17cc3726 + | topics: myfeature + o 2:be7622a7a0f43ba713e152f56441275f8e8711ef + | topics: + o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 + topics: