# HG changeset patch # User Simon Sapin # Date 1641572327 -3600 # Node ID b0443b54160c4338f15d7986590422423d62d9f7 # Parent df204c64faab43d6cea791d03da25ecd5935e832 tests: add a test case for https://bz.mercurial-scm.org/show_bug.cgi?id=6550 diff -r df204c64faab -r b0443b54160c tests/test-check-sdist.t --- a/tests/test-check-sdist.t Sat Nov 20 08:35:06 2021 +0300 +++ b/tests/test-check-sdist.t Fri Jan 07 17:18:47 2022 +0100 @@ -35,7 +35,7 @@ $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files $ wc -l files - 352 files + 353 files $ fgrep debian files tests/test-check-debian.t $ fgrep __init__.py files diff -r df204c64faab -r b0443b54160c tests/test-issue6550.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-issue6550.t Fri Jan 07 17:18:47 2022 +0100 @@ -0,0 +1,49 @@ +histedit should preserve topics (issue6550) +https://bz.mercurial-scm.org/show_bug.cgi?id=6550 + + $ . "$TESTDIR/testlib/topic_setup.sh" + + $ cat << EOF >> "$HGRCPATH" + > [extensions] + > histedit = + > [alias] + > glog = log -G --template "{rev}:{node|short} [{topic}] {desc}\n" + > EOF + +Editing commits with one topic on top of a commit with a different topic: + + $ hg init repo1 + $ cd repo1 + $ hg topic topic1 + marked working directory as topic: topic1 + $ echo 1 > A + $ hg ci -Aqm A + $ hg topic topic2 + $ echo 1 > B + $ hg ci -Aqm B + $ echo 1 > C + $ hg ci -Aqm C + $ hg glog + @ 2:392a64d00726 [topic2] C + | + o 1:8a25a1549e46 [topic2] B + | + o 0:c051488dac25 [topic1] A + +Swap the order of commits B and C + + $ hg histedit s1 -q --commands - 2>&1 << EOF + > pick 392a64d00726 C + > pick 8a25a1549e46 B + > EOF + +Topics of B and C have incorrectly be set to topic1: + + $ hg glog + @ 4:3bf79df9dd38 [topic1] B (known-bad-output !) + | + o 3:c51ea384abdd [topic1] C (known-bad-output !) + | + o 0:c051488dac25 [topic1] A + + $ cd ..