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.
--- 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