Mercurial > evolve
comparison tests/test-issue6550.t @ 6116:b0443b54160c stable
tests: add a test case for https://bz.mercurial-scm.org/show_bug.cgi?id=6550
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 07 Jan 2022 17:18:47 +0100 |
parents | |
children | a27bdd116761 |
comparison
equal
deleted
inserted
replaced
6093:df204c64faab | 6116:b0443b54160c |
---|---|
1 histedit should preserve topics (issue6550) | |
2 https://bz.mercurial-scm.org/show_bug.cgi?id=6550 | |
3 | |
4 $ . "$TESTDIR/testlib/topic_setup.sh" | |
5 | |
6 $ cat << EOF >> "$HGRCPATH" | |
7 > [extensions] | |
8 > histedit = | |
9 > [alias] | |
10 > glog = log -G --template "{rev}:{node|short} [{topic}] {desc}\n" | |
11 > EOF | |
12 | |
13 Editing commits with one topic on top of a commit with a different topic: | |
14 | |
15 $ hg init repo1 | |
16 $ cd repo1 | |
17 $ hg topic topic1 | |
18 marked working directory as topic: topic1 | |
19 $ echo 1 > A | |
20 $ hg ci -Aqm A | |
21 $ hg topic topic2 | |
22 $ echo 1 > B | |
23 $ hg ci -Aqm B | |
24 $ echo 1 > C | |
25 $ hg ci -Aqm C | |
26 $ hg glog | |
27 @ 2:392a64d00726 [topic2] C | |
28 | | |
29 o 1:8a25a1549e46 [topic2] B | |
30 | | |
31 o 0:c051488dac25 [topic1] A | |
32 | |
33 Swap the order of commits B and C | |
34 | |
35 $ hg histedit s1 -q --commands - 2>&1 << EOF | |
36 > pick 392a64d00726 C | |
37 > pick 8a25a1549e46 B | |
38 > EOF | |
39 | |
40 Topics of B and C have incorrectly be set to topic1: | |
41 | |
42 $ hg glog | |
43 @ 4:3bf79df9dd38 [topic1] B (known-bad-output !) | |
44 | | |
45 o 3:c51ea384abdd [topic1] C (known-bad-output !) | |
46 | | |
47 o 0:c051488dac25 [topic1] A | |
48 | |
49 $ cd .. |