# HG changeset patch # User Sushil khanchi # Date 1576842450 -19800 # Node ID abefd37c6afa7954cdfb2186eeff44f75c424090 # Parent a3f692bcbbf48d009d565706c4d14eb520e849f4 evolve: add test to demonstrate a bug when active topic is empty Added test shows that when current active topic is empty and we try to run `hg up`, it fails with an error. It's because this case is not correctly handled when we find a destination to update (when topics are in play) Next patch will fix this. diff -r a3f692bcbbf4 -r abefd37c6afa tests/test-topic-dest.t --- a/tests/test-topic-dest.t Tue Dec 10 21:03:51 2019 +0100 +++ b/tests/test-topic-dest.t Fri Dec 20 17:17:30 2019 +0530 @@ -500,3 +500,17 @@ pick 38eea8439aee 14 arthur pick 411315c48bdc 15 pompadour # p, pick = use commit + + $ cd .. + +destination check: when active topic is empty + + $ hg init emptytopic + $ cd emptytopic + $ echo a > a + $ hg ci -Am "added a" + adding a + $ hg topic foo + marked working directory as topic: foo + $ hg up 2>&1 | grep "AssertionError" + AssertionError: any branch has at least one head