Show More
@@ -1,50 +1,134 b'' | |||||
1 | #!/bin/sh |
|
1 | $ hg init | |
|
2 | ||||
|
3 | Revision 0: | |||
2 |
|
4 | |||
3 | hg init |
|
5 | $ echo "unchanged" > unchanged | |
|
6 | $ echo "remove me" > remove | |||
|
7 | $ echo "copy me" > copy | |||
|
8 | $ echo "move me" > move | |||
|
9 | $ for i in 1 2 3 4 5 6 7 8 9; do | |||
|
10 | > echo "merge ok $i" >> zzz1_merge_ok | |||
|
11 | > done | |||
|
12 | $ echo "merge bad" > zzz2_merge_bad | |||
|
13 | $ hg ci -Am "revision 0" | |||
|
14 | adding copy | |||
|
15 | adding move | |||
|
16 | adding remove | |||
|
17 | adding unchanged | |||
|
18 | adding zzz1_merge_ok | |||
|
19 | adding zzz2_merge_bad | |||
|
20 | ||||
|
21 | Revision 1: | |||
4 |
|
22 | |||
5 | echo "# revision 0" |
|
23 | $ hg rm remove | |
6 | echo "unchanged" > unchanged |
|
24 | $ hg mv move moved | |
7 | echo "remove me" > remove |
|
25 | $ hg cp copy copied | |
8 | echo "copy me" > copy |
|
26 | $ echo "added" > added | |
9 | echo "move me" > move |
|
27 | $ hg add added | |
10 | for i in 1 2 3 4 5 6 7 8 9; do |
|
28 | $ echo "new first line" > zzz1_merge_ok | |
11 |
|
|
29 | $ hg cat zzz1_merge_ok >> zzz1_merge_ok | |
12 | done |
|
30 | $ echo "new last line" >> zzz2_merge_bad | |
13 | echo "merge bad" > zzz2_merge_bad |
|
31 | $ hg ci -m "revision 1" | |
14 | hg ci -Am "revision 0" |
|
32 | ||
|
33 | Local changes to revision 0: | |||
|
34 | ||||
|
35 | $ hg co 0 | |||
|
36 | 4 files updated, 0 files merged, 3 files removed, 0 files unresolved | |||
|
37 | $ echo "new last line" >> zzz1_merge_ok | |||
|
38 | $ echo "another last line" >> zzz2_merge_bad | |||
|
39 | ||||
|
40 | $ hg diff --nodates | grep "^[+-][^<>]" | |||
|
41 | --- a/zzz1_merge_ok | |||
|
42 | +++ b/zzz1_merge_ok | |||
|
43 | +new last line | |||
|
44 | --- a/zzz2_merge_bad | |||
|
45 | +++ b/zzz2_merge_bad | |||
|
46 | +another last line | |||
|
47 | ||||
|
48 | $ hg st | |||
|
49 | M zzz1_merge_ok | |||
|
50 | M zzz2_merge_bad | |||
|
51 | ||||
|
52 | Local merge with bad merge tool: | |||
|
53 | ||||
|
54 | $ HGMERGE=false hg co | |||
|
55 | merging zzz1_merge_ok | |||
|
56 | merging zzz2_merge_bad | |||
|
57 | merging zzz2_merge_bad failed! | |||
|
58 | 3 files updated, 1 files merged, 2 files removed, 1 files unresolved | |||
|
59 | use 'hg resolve' to retry unresolved file merges | |||
15 |
|
60 | |||
16 | echo "# revision 1" |
|
61 | $ hg co 0 | |
17 | hg rm remove |
|
62 | merging zzz1_merge_ok | |
18 | hg mv move moved |
|
63 | merging zzz2_merge_bad | |
19 | hg cp copy copied |
|
64 | warning: conflicts during merge. | |
20 | echo "added" > added |
|
65 | merging zzz2_merge_bad failed! | |
21 | hg add added |
|
66 | 2 files updated, 1 files merged, 3 files removed, 1 files unresolved | |
22 | echo "new first line" > zzz1_merge_ok |
|
67 | use 'hg resolve' to retry unresolved file merges | |
23 | hg cat zzz1_merge_ok >> zzz1_merge_ok |
|
|||
24 | echo "new last line" >> zzz2_merge_bad |
|
|||
25 | hg ci -m "revision 1" |
|
|||
26 |
|
68 | |||
27 | echo "# local changes to revision 0" |
|
69 | $ hg diff --nodates | grep "^[+-][^<>]" | |
28 | hg co 0 |
|
70 | --- a/zzz1_merge_ok | |
29 | echo "new last line" >> zzz1_merge_ok |
|
71 | +++ b/zzz1_merge_ok | |
30 | echo "another last line" >> zzz2_merge_bad |
|
72 | +new last line | |
31 | hg diff --nodates | grep "^[+-][^<>]" |
|
73 | --- a/zzz2_merge_bad | |
32 | hg st |
|
74 | +++ b/zzz2_merge_bad | |
|
75 | +another last line | |||
|
76 | +======= | |||
|
77 | ||||
|
78 | $ hg st | |||
|
79 | M zzz1_merge_ok | |||
|
80 | M zzz2_merge_bad | |||
|
81 | ? zzz2_merge_bad.orig | |||
|
82 | ||||
|
83 | Local merge with conflicts: | |||
|
84 | ||||
|
85 | $ hg co | |||
|
86 | merging zzz1_merge_ok | |||
|
87 | merging zzz2_merge_bad | |||
|
88 | warning: conflicts during merge. | |||
|
89 | merging zzz2_merge_bad failed! | |||
|
90 | 3 files updated, 1 files merged, 2 files removed, 1 files unresolved | |||
|
91 | use 'hg resolve' to retry unresolved file merges | |||
33 |
|
92 | |||
34 | echo "# local merge with bad merge tool" |
|
93 | $ hg co 0 | |
35 | HGMERGE=false hg co |
|
94 | merging zzz1_merge_ok | |
36 | hg co 0 |
|
95 | merging zzz2_merge_bad | |
37 | hg diff --nodates | grep "^[+-][^<>]" |
|
96 | warning: conflicts during merge. | |
38 | hg st |
|
97 | merging zzz2_merge_bad failed! | |
|
98 | 2 files updated, 1 files merged, 3 files removed, 1 files unresolved | |||
|
99 | use 'hg resolve' to retry unresolved file merges | |||
|
100 | ||||
|
101 | $ hg diff --nodates | grep "^[+-][^<>]" | |||
|
102 | --- a/zzz1_merge_ok | |||
|
103 | +++ b/zzz1_merge_ok | |||
|
104 | +new last line | |||
|
105 | --- a/zzz2_merge_bad | |||
|
106 | +++ b/zzz2_merge_bad | |||
|
107 | +another last line | |||
|
108 | +======= | |||
|
109 | +======= | |||
|
110 | +new last line | |||
|
111 | +======= | |||
39 |
|
112 | |||
40 | echo "# local merge with conflicts" |
|
113 | $ hg st | |
41 | hg co |
|
114 | M zzz1_merge_ok | |
42 | hg co 0 |
|
115 | M zzz2_merge_bad | |
43 | hg diff --nodates | grep "^[+-][^<>]" |
|
116 | ? zzz2_merge_bad.orig | |
44 | hg st |
|
117 | ||
|
118 | Local merge without conflicts: | |||
|
119 | ||||
|
120 | $ hg revert zzz2_merge_bad | |||
45 |
|
121 | |||
46 | echo "# local merge without conflicts" |
|
122 | $ hg co | |
47 | hg revert zzz2_merge_bad |
|
123 | merging zzz1_merge_ok | |
48 | hg co |
|
124 | 4 files updated, 1 files merged, 2 files removed, 0 files unresolved | |
49 | hg diff --nodates | grep "^[+-][^<>]" |
|
125 | ||
50 | hg st |
|
126 | $ hg diff --nodates | grep "^[+-][^<>]" | |
|
127 | --- a/zzz1_merge_ok | |||
|
128 | +++ b/zzz1_merge_ok | |||
|
129 | +new last line | |||
|
130 | ||||
|
131 | $ hg st | |||
|
132 | M zzz1_merge_ok | |||
|
133 | ? zzz2_merge_bad.orig | |||
|
134 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now