comparison tests/test-amend-merge.t @ 5942:92a53d091701 mercurial-5.3

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