Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 ..