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