annotate tests/test-amend-merge.t @ 6007:ee54e02d3ea0 mercurial-4.6

test-compat: merge mercurial-4.7 into mercurial-4.6
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 12 Aug 2021 22:01:17 +0200
parents 1a8e86053adb
children c3d66af4cb07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5918
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
1 This test amends a merge commit using various commands, including topics
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
2
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
3 $ . $TESTDIR/testlib/common.sh
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
4
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
5 $ cat >> $HGRCPATH << EOF
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
6 > [extensions]
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
7 > evolve =
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
8 > topic =
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
9 > EOF
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
10
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
11 $ hg init amending-a-merge
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
12 $ cd amending-a-merge
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
13
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
14 $ mkcommit root
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
15 $ mkcommit apple
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
16 $ hg up 'desc("root")'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
17 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
18 $ mkcommit banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
19 created new head
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
20 (consider using topic for lightweight branches. See 'hg help topic')
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
21 $ hg up 'desc("apple")'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
22 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
23 $ hg merge 'desc("banana")'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
24 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
25 (branch merge, don't forget to commit)
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
26
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
27 $ hg ci -m merge
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
28 $ hg diff -r 'p1(.)' -r '.'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
29 diff -r 88a060ab6523 -r c20705a6a8c4 banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
30 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
31 +++ b/banana Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
32 @@ -0,0 +1,1 @@
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
33 +banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
34 $ hg diff -r 'p2(.)' -r '.'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
35 diff -r d8c7baf0ca58 -r c20705a6a8c4 apple
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
36 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
37 +++ b/apple Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
38 @@ -0,0 +1,1 @@
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
39 +apple
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
40
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
41 amend
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
42
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
43 $ hg amend -m 'merge, amend'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
44 $ hg diff -r 'p1(.)' -r '.'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
45 diff -r 88a060ab6523 -r 456753fae3cd banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
46 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
47 +++ b/banana Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
48 @@ -0,0 +1,1 @@
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
49 +banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
50 $ hg diff -r 'p2(.)' -r '.'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
51 diff -r d8c7baf0ca58 -r 456753fae3cd apple
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
52 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
53 +++ b/apple Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
54 @@ -0,0 +1,1 @@
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
55 +apple
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
56
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
57 metaedit
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
58
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
59 $ hg metaedit -m 'merge, metaedit'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
60 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
61 $ hg diff -r 'p1(.)' -r '.'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
62 diff -r 88a060ab6523 -r 1528d42f3e83 banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
63 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
64 +++ b/banana Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
65 @@ -0,0 +1,1 @@
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
66 +banana
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
67 $ hg diff -r 'p2(.)' -r '.'
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
68 diff -r d8c7baf0ca58 -r 1528d42f3e83 apple
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
69 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
70 +++ b/apple Thu Jan 01 00:00:00 1970 +0000
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
71 @@ -0,0 +1,1 @@
13c406d9912c tests: add test-amend-merge.t with a simple merge amended by various commands
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
72 +apple
5919
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
73
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
74 topics
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
75
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
76 $ hg topics -r . foo
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
77 switching to topic foo
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
78 changed topic on 1 changesets to "foo"
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
79 $ hg diff -r 'p1(.)' -r '.'
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
80 diff -r 88a060ab6523 -r 52150b9639f7 banana
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
81 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
82 +++ b/banana Thu Jan 01 00:00:00 1970 +0000
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
83 @@ -0,0 +1,1 @@
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
84 +banana
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
85 $ hg diff -r 'p2(.)' -r '.'
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
86 diff -r d8c7baf0ca58 -r 52150b9639f7 apple
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
87 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
88 +++ b/apple Thu Jan 01 00:00:00 1970 +0000
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
89 @@ -0,0 +1,1 @@
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
90 +apple
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
91
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
92 $ hg files
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
93 apple
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
94 banana
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
95 root
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
96 $ hg cat apple banana
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
97 apple
1a8e86053adb topic: don't lose any file changes when changing topic of a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 5918
diff changeset
98 banana