# HG changeset patch # User Sushil khanchi # Date 1576843327 -19800 # Node ID 21168e99ba880d2b1de100031868d41e72445de3 # Parent b1a9d548af52b824407ca5571afcaa009357d3c6 evolve: add test to demonstrate a bug when no active topic Added test shows that the logic to find the destination for `hg up` in the case when "working directory parent has a topic but wdir has no active topic" is buggy. This will be fixed in next patch. diff -r b1a9d548af52 -r 21168e99ba88 tests/test-topic-dest.t --- a/tests/test-topic-dest.t Fri Dec 20 17:31:57 2019 +0530 +++ b/tests/test-topic-dest.t Fri Dec 20 17:32:07 2019 +0530 @@ -515,3 +515,16 @@ $ hg up clearing empty topic "foo" 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + +destination check: when wdp has a topic but wdir has no active topic: + + $ hg topic foo + marked working directory as topic: foo + $ echo b > b + $ hg ci -Am "added b" + adding b + active topic 'foo' grew its first changeset + (see 'hg help topics' for more information) + $ hg topic --clear + $ hg up 2>&1 | grep "AssertionError" + AssertionError: any revision has at least one descendant branch head