Show More
@@ -1,53 +1,53 b'' | |||
|
1 | 1 | b51a8138292a introduced a regression where we would mention in the |
|
2 | 2 | changelog executable files added by the second parent of a merge. Test |
|
3 | 3 | that that doesn't happen anymore |
|
4 | 4 | |
|
5 | 5 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
6 | 6 | |
|
7 | 7 | $ hg init repo |
|
8 | 8 | $ cd repo |
|
9 | 9 | $ echo foo > foo |
|
10 | 10 | $ hg ci -qAm 'add foo' |
|
11 | 11 | |
|
12 | 12 | $ echo bar > bar |
|
13 | 13 | $ chmod +x bar |
|
14 | 14 | $ hg ci -qAm 'add bar' |
|
15 | 15 | |
|
16 | 16 | manifest of p2: |
|
17 | 17 | |
|
18 | 18 | $ hg manifest |
|
19 | 19 | bar |
|
20 | 20 | foo |
|
21 | 21 | |
|
22 | 22 | $ hg up -qC 0 |
|
23 | 23 | $ echo >> foo |
|
24 | 24 | $ hg ci -m 'change foo' |
|
25 | 25 | created new head |
|
26 | 26 | |
|
27 | 27 | manifest of p1: |
|
28 | 28 | |
|
29 | 29 | $ hg manifest |
|
30 | 30 | foo |
|
31 | 31 | |
|
32 | 32 | $ hg merge |
|
33 | 33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
34 | 34 | (branch merge, don't forget to commit) |
|
35 | 35 | $ hg ci -m 'merge' |
|
36 | 36 | |
|
37 | 37 | this should not mention bar: |
|
38 | 38 | |
|
39 | 39 | $ hg tip -v |
|
40 | 40 | changeset: 3:ef2fc9b4a51b |
|
41 | 41 | tag: tip |
|
42 | 42 | parent: 2:ed1b79f46b9a |
|
43 | 43 | parent: 1:d394a8db219b |
|
44 | 44 | user: test |
|
45 | 45 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
46 | 46 | description: |
|
47 | 47 | merge |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | |
|
51 |
$ hg debugindex |
|
|
51 | $ hg debugindex bar | |
|
52 | 52 | rev offset length base linkrev nodeid p1 p2 |
|
53 | 53 | 0 0 5 0 1 b004912a8510 000000000000 000000000000 |
@@ -1,220 +1,220 b'' | |||
|
1 | 1 | $ hg init test |
|
2 | 2 | $ cd test |
|
3 | 3 | |
|
4 | 4 | $ echo 0 >> afile |
|
5 | 5 | $ hg add afile |
|
6 | 6 | $ hg commit -m "0.0" |
|
7 | 7 | |
|
8 | 8 | $ echo 1 >> afile |
|
9 | 9 | $ hg commit -m "0.1" |
|
10 | 10 | |
|
11 | 11 | $ echo 2 >> afile |
|
12 | 12 | $ hg commit -m "0.2" |
|
13 | 13 | |
|
14 | 14 | $ echo 3 >> afile |
|
15 | 15 | $ hg commit -m "0.3" |
|
16 | 16 | |
|
17 | 17 | $ hg update -C 0 |
|
18 | 18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 19 | |
|
20 | 20 | $ echo 1 >> afile |
|
21 | 21 | $ hg commit -m "1.1" |
|
22 | 22 | created new head |
|
23 | 23 | |
|
24 | 24 | $ echo 2 >> afile |
|
25 | 25 | $ hg commit -m "1.2" |
|
26 | 26 | |
|
27 | 27 | $ echo a line > fred |
|
28 | 28 | $ echo 3 >> afile |
|
29 | 29 | $ hg add fred |
|
30 | 30 | $ hg commit -m "1.3" |
|
31 | 31 | $ hg mv afile adifferentfile |
|
32 | 32 | $ hg commit -m "1.3m" |
|
33 | 33 | |
|
34 | 34 | $ hg update -C 3 |
|
35 | 35 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
36 | 36 | |
|
37 | 37 | $ hg mv afile anotherfile |
|
38 | 38 | $ hg commit -m "0.3m" |
|
39 | 39 | |
|
40 |
$ hg debugindex -f 1 |
|
|
40 | $ hg debugindex -f 1 afile | |
|
41 | 41 | rev flag offset length size base link p1 p2 nodeid |
|
42 | 42 | 0 0000 0 3 2 0 0 -1 -1 362fef284ce2 |
|
43 | 43 | 1 0000 3 5 4 1 1 0 -1 125144f7e028 |
|
44 | 44 | 2 0000 8 7 6 2 2 1 -1 4c982badb186 |
|
45 | 45 | 3 0000 15 9 8 3 3 2 -1 19b1fc555737 |
|
46 | 46 | |
|
47 |
$ hg debugindex |
|
|
47 | $ hg debugindex adifferentfile | |
|
48 | 48 | rev offset length base linkrev nodeid p1 p2 |
|
49 | 49 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 |
|
50 | 50 | |
|
51 |
$ hg debugindex |
|
|
51 | $ hg debugindex anotherfile | |
|
52 | 52 | rev offset length base linkrev nodeid p1 p2 |
|
53 | 53 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 |
|
54 | 54 | |
|
55 |
$ hg debugindex |
|
|
55 | $ hg debugindex fred | |
|
56 | 56 | rev offset length base linkrev nodeid p1 p2 |
|
57 | 57 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 |
|
58 | 58 | |
|
59 | 59 | $ hg debugindex .hg/store/00manifest.i |
|
60 | 60 | rev offset length base linkrev nodeid p1 p2 |
|
61 | 61 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 |
|
62 | 62 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 |
|
63 | 63 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 |
|
64 | 64 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 |
|
65 | 65 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 |
|
66 | 66 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 |
|
67 | 67 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 |
|
68 | 68 | |
|
69 | 69 | $ hg verify |
|
70 | 70 | checking changesets |
|
71 | 71 | checking manifests |
|
72 | 72 | crosschecking files in changesets and manifests |
|
73 | 73 | checking files |
|
74 | 74 | 4 files, 9 changesets, 7 total revisions |
|
75 | 75 | |
|
76 | 76 | $ cd .. |
|
77 | 77 | |
|
78 | 78 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
79 | 79 | > echo |
|
80 | 80 | > echo ---- hg clone -r "$i" test test-"$i" |
|
81 | 81 | > hg clone -r "$i" test test-"$i" |
|
82 | 82 | > cd test-"$i" |
|
83 | 83 | > hg verify |
|
84 | 84 | > cd .. |
|
85 | 85 | > done |
|
86 | 86 | |
|
87 | 87 | ---- hg clone -r 0 test test-0 |
|
88 | 88 | adding changesets |
|
89 | 89 | adding manifests |
|
90 | 90 | adding file changes |
|
91 | 91 | added 1 changesets with 1 changes to 1 files |
|
92 | 92 | updating to branch default |
|
93 | 93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 | 94 | checking changesets |
|
95 | 95 | checking manifests |
|
96 | 96 | crosschecking files in changesets and manifests |
|
97 | 97 | checking files |
|
98 | 98 | 1 files, 1 changesets, 1 total revisions |
|
99 | 99 | |
|
100 | 100 | ---- hg clone -r 1 test test-1 |
|
101 | 101 | adding changesets |
|
102 | 102 | adding manifests |
|
103 | 103 | adding file changes |
|
104 | 104 | added 2 changesets with 2 changes to 1 files |
|
105 | 105 | updating to branch default |
|
106 | 106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 107 | checking changesets |
|
108 | 108 | checking manifests |
|
109 | 109 | crosschecking files in changesets and manifests |
|
110 | 110 | checking files |
|
111 | 111 | 1 files, 2 changesets, 2 total revisions |
|
112 | 112 | |
|
113 | 113 | ---- hg clone -r 2 test test-2 |
|
114 | 114 | adding changesets |
|
115 | 115 | adding manifests |
|
116 | 116 | adding file changes |
|
117 | 117 | added 3 changesets with 3 changes to 1 files |
|
118 | 118 | updating to branch default |
|
119 | 119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
120 | 120 | checking changesets |
|
121 | 121 | checking manifests |
|
122 | 122 | crosschecking files in changesets and manifests |
|
123 | 123 | checking files |
|
124 | 124 | 1 files, 3 changesets, 3 total revisions |
|
125 | 125 | |
|
126 | 126 | ---- hg clone -r 3 test test-3 |
|
127 | 127 | adding changesets |
|
128 | 128 | adding manifests |
|
129 | 129 | adding file changes |
|
130 | 130 | added 4 changesets with 4 changes to 1 files |
|
131 | 131 | updating to branch default |
|
132 | 132 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
133 | 133 | checking changesets |
|
134 | 134 | checking manifests |
|
135 | 135 | crosschecking files in changesets and manifests |
|
136 | 136 | checking files |
|
137 | 137 | 1 files, 4 changesets, 4 total revisions |
|
138 | 138 | |
|
139 | 139 | ---- hg clone -r 4 test test-4 |
|
140 | 140 | adding changesets |
|
141 | 141 | adding manifests |
|
142 | 142 | adding file changes |
|
143 | 143 | added 2 changesets with 2 changes to 1 files |
|
144 | 144 | updating to branch default |
|
145 | 145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
146 | 146 | checking changesets |
|
147 | 147 | checking manifests |
|
148 | 148 | crosschecking files in changesets and manifests |
|
149 | 149 | checking files |
|
150 | 150 | 1 files, 2 changesets, 2 total revisions |
|
151 | 151 | |
|
152 | 152 | ---- hg clone -r 5 test test-5 |
|
153 | 153 | adding changesets |
|
154 | 154 | adding manifests |
|
155 | 155 | adding file changes |
|
156 | 156 | added 3 changesets with 3 changes to 1 files |
|
157 | 157 | updating to branch default |
|
158 | 158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 159 | checking changesets |
|
160 | 160 | checking manifests |
|
161 | 161 | crosschecking files in changesets and manifests |
|
162 | 162 | checking files |
|
163 | 163 | 1 files, 3 changesets, 3 total revisions |
|
164 | 164 | |
|
165 | 165 | ---- hg clone -r 6 test test-6 |
|
166 | 166 | adding changesets |
|
167 | 167 | adding manifests |
|
168 | 168 | adding file changes |
|
169 | 169 | added 4 changesets with 5 changes to 2 files |
|
170 | 170 | updating to branch default |
|
171 | 171 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
172 | 172 | checking changesets |
|
173 | 173 | checking manifests |
|
174 | 174 | crosschecking files in changesets and manifests |
|
175 | 175 | checking files |
|
176 | 176 | 2 files, 4 changesets, 5 total revisions |
|
177 | 177 | |
|
178 | 178 | ---- hg clone -r 7 test test-7 |
|
179 | 179 | adding changesets |
|
180 | 180 | adding manifests |
|
181 | 181 | adding file changes |
|
182 | 182 | added 5 changesets with 6 changes to 3 files |
|
183 | 183 | updating to branch default |
|
184 | 184 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
185 | 185 | checking changesets |
|
186 | 186 | checking manifests |
|
187 | 187 | crosschecking files in changesets and manifests |
|
188 | 188 | checking files |
|
189 | 189 | 3 files, 5 changesets, 6 total revisions |
|
190 | 190 | |
|
191 | 191 | ---- hg clone -r 8 test test-8 |
|
192 | 192 | adding changesets |
|
193 | 193 | adding manifests |
|
194 | 194 | adding file changes |
|
195 | 195 | added 5 changesets with 5 changes to 2 files |
|
196 | 196 | updating to branch default |
|
197 | 197 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
198 | 198 | checking changesets |
|
199 | 199 | checking manifests |
|
200 | 200 | crosschecking files in changesets and manifests |
|
201 | 201 | checking files |
|
202 | 202 | 2 files, 5 changesets, 5 total revisions |
|
203 | 203 | |
|
204 | 204 | $ cd test-8 |
|
205 | 205 | $ hg pull ../test-7 |
|
206 | 206 | pulling from ../test-7 |
|
207 | 207 | searching for changes |
|
208 | 208 | adding changesets |
|
209 | 209 | adding manifests |
|
210 | 210 | adding file changes |
|
211 | 211 | added 4 changesets with 2 changes to 3 files (+1 heads) |
|
212 | 212 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
213 | 213 | $ hg verify |
|
214 | 214 | checking changesets |
|
215 | 215 | checking manifests |
|
216 | 216 | crosschecking files in changesets and manifests |
|
217 | 217 | checking files |
|
218 | 218 | 4 files, 9 changesets, 7 total revisions |
|
219 | 219 | $ cd .. |
|
220 | 220 |
@@ -1,16 +1,16 b'' | |||
|
1 | 1 | $ hg init dir |
|
2 | 2 | $ cd dir |
|
3 | 3 | $ echo bleh > bar |
|
4 | 4 | $ hg add bar |
|
5 | 5 | $ hg ci -m 'add bar' |
|
6 | 6 | |
|
7 | 7 | $ hg cp bar foo |
|
8 | 8 | $ echo >> bar |
|
9 | 9 | $ hg ci -m 'cp bar foo; change bar' |
|
10 | 10 | |
|
11 | 11 | $ hg debugrename foo |
|
12 | 12 | foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9 |
|
13 |
$ hg debugindex |
|
|
13 | $ hg debugindex bar | |
|
14 | 14 | rev offset length base linkrev nodeid p1 p2 |
|
15 | 15 | 0 0 6 0 0 26d3ca0dfd18 000000000000 000000000000 |
|
16 | 16 | 1 6 7 1 1 d267bddd54f7 26d3ca0dfd18 000000000000 |
@@ -1,94 +1,94 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo a > a |
|
3 | 3 | $ hg add a |
|
4 | 4 | $ hg commit -m "1" |
|
5 | 5 | $ hg status |
|
6 | 6 | $ hg copy a b |
|
7 | 7 | $ hg --config ui.portablefilenames=abort copy a con.xml |
|
8 | 8 | abort: filename contains 'con', which is reserved on Windows: 'con.xml' |
|
9 | 9 | [255] |
|
10 | 10 | $ hg status |
|
11 | 11 | A b |
|
12 | 12 | $ hg sum |
|
13 | 13 | parent: 0:c19d34741b0a tip |
|
14 | 14 | 1 |
|
15 | 15 | branch: default |
|
16 | 16 | commit: 1 copied |
|
17 | 17 | update: (current) |
|
18 | 18 | $ hg --debug commit -m "2" |
|
19 | 19 | b |
|
20 | 20 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
21 | 21 | committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4 |
|
22 | 22 | |
|
23 | 23 | we should see two history entries |
|
24 | 24 | |
|
25 | 25 | $ hg history -v |
|
26 | 26 | changeset: 1:93580a2c28a5 |
|
27 | 27 | tag: tip |
|
28 | 28 | user: test |
|
29 | 29 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
30 | 30 | files: b |
|
31 | 31 | description: |
|
32 | 32 | 2 |
|
33 | 33 | |
|
34 | 34 | |
|
35 | 35 | changeset: 0:c19d34741b0a |
|
36 | 36 | user: test |
|
37 | 37 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
38 | 38 | files: a |
|
39 | 39 | description: |
|
40 | 40 | 1 |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | |
|
44 | 44 | we should see one log entry for a |
|
45 | 45 | |
|
46 | 46 | $ hg log a |
|
47 | 47 | changeset: 0:c19d34741b0a |
|
48 | 48 | user: test |
|
49 | 49 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
50 | 50 | summary: 1 |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | this should show a revision linked to changeset 0 |
|
54 | 54 | |
|
55 |
$ hg debugindex |
|
|
55 | $ hg debugindex a | |
|
56 | 56 | rev offset length base linkrev nodeid p1 p2 |
|
57 | 57 | 0 0 3 0 0 b789fdd96dc2 000000000000 000000000000 |
|
58 | 58 | |
|
59 | 59 | we should see one log entry for b |
|
60 | 60 | |
|
61 | 61 | $ hg log b |
|
62 | 62 | changeset: 1:93580a2c28a5 |
|
63 | 63 | tag: tip |
|
64 | 64 | user: test |
|
65 | 65 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | 66 | summary: 2 |
|
67 | 67 | |
|
68 | 68 | |
|
69 | 69 | this should show a revision linked to changeset 1 |
|
70 | 70 | |
|
71 |
$ hg debugindex |
|
|
71 | $ hg debugindex b | |
|
72 | 72 | rev offset length base linkrev nodeid p1 p2 |
|
73 | 73 | 0 0 65 0 1 37d9b5d994ea 000000000000 000000000000 |
|
74 | 74 | |
|
75 | 75 | this should show the rename information in the metadata |
|
76 | 76 | |
|
77 |
$ hg debugdata |
|
|
77 | $ hg debugdata b 0 | head -3 | tail -2 | |
|
78 | 78 | copy: a |
|
79 | 79 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
80 | 80 | |
|
81 | 81 | $ $TESTDIR/md5sum.py .hg/store/data/b.i |
|
82 | 82 | 4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i |
|
83 | 83 | $ hg cat b > bsum |
|
84 | 84 | $ $TESTDIR/md5sum.py bsum |
|
85 | 85 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
|
86 | 86 | $ hg cat a > asum |
|
87 | 87 | $ $TESTDIR/md5sum.py asum |
|
88 | 88 | 60b725f10c9c85c70d97880dfe8191b3 asum |
|
89 | 89 | $ hg verify |
|
90 | 90 | checking changesets |
|
91 | 91 | checking manifests |
|
92 | 92 | crosschecking files in changesets and manifests |
|
93 | 93 | checking files |
|
94 | 94 | 2 files, 2 changesets, 2 total revisions |
@@ -1,102 +1,102 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo foo > foo |
|
3 | 3 | should fail - foo is not managed |
|
4 | 4 | $ hg mv foo bar |
|
5 | 5 | foo: not copying - file is not managed |
|
6 | 6 | abort: no files to copy |
|
7 | 7 | [255] |
|
8 | 8 | $ hg st -A |
|
9 | 9 | ? foo |
|
10 | 10 | $ hg add foo |
|
11 | 11 | dry-run; print a warning that this is not a real copy; foo is added |
|
12 | 12 | $ hg mv --dry-run foo bar |
|
13 | 13 | foo has not been committed yet, so no copy data will be stored for bar. |
|
14 | 14 | $ hg st -A |
|
15 | 15 | A foo |
|
16 | 16 | should print a warning that this is not a real copy; bar is added |
|
17 | 17 | $ hg mv foo bar |
|
18 | 18 | foo has not been committed yet, so no copy data will be stored for bar. |
|
19 | 19 | $ hg st -A |
|
20 | 20 | A bar |
|
21 | 21 | should print a warning that this is not a real copy; foo is added |
|
22 | 22 | $ hg cp bar foo |
|
23 | 23 | bar has not been committed yet, so no copy data will be stored for foo. |
|
24 | 24 | $ hg rm -f bar |
|
25 | 25 | $ rm bar |
|
26 | 26 | $ hg st -A |
|
27 | 27 | A foo |
|
28 | 28 | $ hg commit -m1 |
|
29 | 29 | |
|
30 | 30 | copy --after to a nonexistant target filename |
|
31 | 31 | $ hg cp -A foo dummy |
|
32 | 32 | foo: not recording copy - dummy does not exist |
|
33 | 33 | |
|
34 | 34 | dry-run; should show that foo is clean |
|
35 | 35 | $ hg copy --dry-run foo bar |
|
36 | 36 | $ hg st -A |
|
37 | 37 | C foo |
|
38 | 38 | should show copy |
|
39 | 39 | $ hg copy foo bar |
|
40 | 40 | $ hg st -C |
|
41 | 41 | A bar |
|
42 | 42 | foo |
|
43 | 43 | |
|
44 | 44 | shouldn't show copy |
|
45 | 45 | $ hg commit -m2 |
|
46 | 46 | $ hg st -C |
|
47 | 47 | |
|
48 | 48 | should match |
|
49 |
$ hg debugindex |
|
|
49 | $ hg debugindex foo | |
|
50 | 50 | rev offset length base linkrev nodeid p1 p2 |
|
51 | 51 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
52 | 52 | $ hg debugrename bar |
|
53 | 53 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
|
54 | 54 | |
|
55 | 55 | $ echo bleah > foo |
|
56 | 56 | $ echo quux > bar |
|
57 | 57 | $ hg commit -m3 |
|
58 | 58 | |
|
59 | 59 | should not be renamed |
|
60 | 60 | $ hg debugrename bar |
|
61 | 61 | bar not renamed |
|
62 | 62 | |
|
63 | 63 | $ hg copy -f foo bar |
|
64 | 64 | should show copy |
|
65 | 65 | $ hg st -C |
|
66 | 66 | M bar |
|
67 | 67 | foo |
|
68 | 68 | $ hg commit -m3 |
|
69 | 69 | |
|
70 | 70 | should show no parents for tip |
|
71 |
$ hg debugindex |
|
|
71 | $ hg debugindex bar | |
|
72 | 72 | rev offset length base linkrev nodeid p1 p2 |
|
73 | 73 | 0 0 69 0 1 7711d36246cc 000000000000 000000000000 |
|
74 | 74 | 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000 |
|
75 | 75 | 2 75 81 1 3 b2558327ea8d 000000000000 000000000000 |
|
76 | 76 | should match |
|
77 |
$ hg debugindex |
|
|
77 | $ hg debugindex foo | |
|
78 | 78 | rev offset length base linkrev nodeid p1 p2 |
|
79 | 79 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
80 | 80 | 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 |
|
81 | 81 | $ hg debugrename bar |
|
82 | 82 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 |
|
83 | 83 | |
|
84 | 84 | should show no copies |
|
85 | 85 | $ hg st -C |
|
86 | 86 | |
|
87 | 87 | copy --after on an added file |
|
88 | 88 | $ cp bar baz |
|
89 | 89 | $ hg add baz |
|
90 | 90 | $ hg cp -A bar baz |
|
91 | 91 | $ hg st -C |
|
92 | 92 | A baz |
|
93 | 93 | bar |
|
94 | 94 | |
|
95 | 95 | foo was clean: |
|
96 | 96 | $ hg st -AC foo |
|
97 | 97 | C foo |
|
98 | 98 | but it's considered modified after a copy --after --force |
|
99 | 99 | $ hg copy -Af bar foo |
|
100 | 100 | $ hg st -AC foo |
|
101 | 101 | M foo |
|
102 | 102 | bar |
@@ -1,61 +1,61 b'' | |||
|
1 | 1 | Test encode/decode filters |
|
2 | 2 | |
|
3 | 3 | $ hg init |
|
4 | 4 | $ cat > .hg/hgrc <<EOF |
|
5 | 5 | > [encode] |
|
6 | 6 | > not.gz = tr [:lower:] [:upper:] |
|
7 | 7 | > *.gz = gzip -d |
|
8 | 8 | > [decode] |
|
9 | 9 | > not.gz = tr [:upper:] [:lower:] |
|
10 | 10 | > *.gz = gzip |
|
11 | 11 | > EOF |
|
12 | 12 | $ echo "this is a test" | gzip > a.gz |
|
13 | 13 | $ echo "this is a test" > not.gz |
|
14 | 14 | $ hg add * |
|
15 | 15 | $ hg ci -m "test" |
|
16 | 16 | |
|
17 | 17 | no changes |
|
18 | 18 | |
|
19 | 19 | $ hg status |
|
20 | 20 | $ touch * |
|
21 | 21 | |
|
22 | 22 | no changes |
|
23 | 23 | |
|
24 | 24 | $ hg status |
|
25 | 25 | |
|
26 | 26 | check contents in repo are encoded |
|
27 | 27 | |
|
28 |
$ hg debugdata |
|
|
28 | $ hg debugdata a.gz 0 | |
|
29 | 29 | this is a test |
|
30 |
$ hg debugdata |
|
|
30 | $ hg debugdata not.gz 0 | |
|
31 | 31 | THIS IS A TEST |
|
32 | 32 | |
|
33 | 33 | check committed content was decoded |
|
34 | 34 | |
|
35 | 35 | $ gunzip < a.gz |
|
36 | 36 | this is a test |
|
37 | 37 | $ cat not.gz |
|
38 | 38 | this is a test |
|
39 | 39 | $ rm * |
|
40 | 40 | $ hg co -C |
|
41 | 41 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 42 | |
|
43 | 43 | check decoding of our new working dir copy |
|
44 | 44 | |
|
45 | 45 | $ gunzip < a.gz |
|
46 | 46 | this is a test |
|
47 | 47 | $ cat not.gz |
|
48 | 48 | this is a test |
|
49 | 49 | |
|
50 | 50 | check hg cat operation |
|
51 | 51 | |
|
52 | 52 | $ hg cat a.gz |
|
53 | 53 | this is a test |
|
54 | 54 | $ hg cat --decode a.gz | gunzip |
|
55 | 55 | this is a test |
|
56 | 56 | $ mkdir subdir |
|
57 | 57 | $ cd subdir |
|
58 | 58 | $ hg -R .. cat ../a.gz |
|
59 | 59 | this is a test |
|
60 | 60 | $ hg -R .. cat --decode ../a.gz | gunzip |
|
61 | 61 | this is a test |
@@ -1,101 +1,101 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | |
|
3 | 3 | $ echo foo > a |
|
4 | 4 | $ echo foo > b |
|
5 | 5 | $ hg add a b |
|
6 | 6 | |
|
7 | 7 | $ hg ci -m "test" |
|
8 | 8 | |
|
9 | 9 | $ echo blah > a |
|
10 | 10 | |
|
11 | 11 | $ hg ci -m "branch a" |
|
12 | 12 | |
|
13 | 13 | $ hg co 0 |
|
14 | 14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 15 | |
|
16 | 16 | $ echo blah > b |
|
17 | 17 | |
|
18 | 18 | $ hg ci -m "branch b" |
|
19 | 19 | created new head |
|
20 | 20 | $ HGMERGE=true hg merge 1 |
|
21 | 21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 22 | (branch merge, don't forget to commit) |
|
23 | 23 | |
|
24 | 24 | $ hg ci -m "merge b/a -> blah" |
|
25 | 25 | |
|
26 | 26 | $ hg co 1 |
|
27 | 27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | $ HGMERGE=true hg merge 2 |
|
29 | 29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 30 | (branch merge, don't forget to commit) |
|
31 | 31 | $ hg ci -m "merge a/b -> blah" |
|
32 | 32 | created new head |
|
33 | 33 | |
|
34 | 34 | $ hg log |
|
35 | 35 | changeset: 4:2ee31f665a86 |
|
36 | 36 | tag: tip |
|
37 | 37 | parent: 1:96155394af80 |
|
38 | 38 | parent: 2:92cc4c306b19 |
|
39 | 39 | user: test |
|
40 | 40 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
41 | 41 | summary: merge a/b -> blah |
|
42 | 42 | |
|
43 | 43 | changeset: 3:e16a66a37edd |
|
44 | 44 | parent: 2:92cc4c306b19 |
|
45 | 45 | parent: 1:96155394af80 |
|
46 | 46 | user: test |
|
47 | 47 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
48 | 48 | summary: merge b/a -> blah |
|
49 | 49 | |
|
50 | 50 | changeset: 2:92cc4c306b19 |
|
51 | 51 | parent: 0:5e0375449e74 |
|
52 | 52 | user: test |
|
53 | 53 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
54 | 54 | summary: branch b |
|
55 | 55 | |
|
56 | 56 | changeset: 1:96155394af80 |
|
57 | 57 | user: test |
|
58 | 58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | 59 | summary: branch a |
|
60 | 60 | |
|
61 | 61 | changeset: 0:5e0375449e74 |
|
62 | 62 | user: test |
|
63 | 63 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
64 | 64 | summary: test |
|
65 | 65 | |
|
66 | 66 | $ hg debugindex .hg/store/00changelog.i |
|
67 | 67 | rev offset length base linkrev nodeid p1 p2 |
|
68 | 68 | 0 0 60 0 0 5e0375449e74 000000000000 000000000000 |
|
69 | 69 | 1 60 62 1 1 96155394af80 5e0375449e74 000000000000 |
|
70 | 70 | 2 122 62 2 2 92cc4c306b19 5e0375449e74 000000000000 |
|
71 | 71 | 3 184 69 3 3 e16a66a37edd 92cc4c306b19 96155394af80 |
|
72 | 72 | 4 253 29 3 4 2ee31f665a86 96155394af80 92cc4c306b19 |
|
73 | 73 | |
|
74 | 74 | revision 1 |
|
75 | 75 | $ hg manifest --debug 1 |
|
76 | 76 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
77 | 77 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 b |
|
78 | 78 | revision 2 |
|
79 | 79 | $ hg manifest --debug 2 |
|
80 | 80 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 a |
|
81 | 81 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
82 | 82 | revision 3 |
|
83 | 83 | $ hg manifest --debug 3 |
|
84 | 84 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
85 | 85 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
86 | 86 | revision 4 |
|
87 | 87 | $ hg manifest --debug 4 |
|
88 | 88 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
89 | 89 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
90 | 90 | |
|
91 |
$ hg debugindex |
|
|
91 | $ hg debugindex a | |
|
92 | 92 | rev offset length base linkrev nodeid p1 p2 |
|
93 | 93 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
94 | 94 | 1 5 6 1 1 79d7492df40a 2ed2a3912a0b 000000000000 |
|
95 | 95 | |
|
96 | 96 | $ hg verify |
|
97 | 97 | checking changesets |
|
98 | 98 | checking manifests |
|
99 | 99 | crosschecking files in changesets and manifests |
|
100 | 100 | checking files |
|
101 | 101 | 2 files, 5 changesets, 4 total revisions |
@@ -1,21 +1,21 b'' | |||
|
1 | 1 | Issue351: mq: qrefresh can create extra revlog entry |
|
2 | 2 | |
|
3 | 3 | $ echo "[extensions]" >> $HGRCPATH |
|
4 | 4 | $ echo "mq=" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | $ hg init |
|
7 | 7 | $ hg qinit |
|
8 | 8 | |
|
9 | 9 | $ echo b > b |
|
10 | 10 | $ hg ci -A -m foo |
|
11 | 11 | adding b |
|
12 | 12 | |
|
13 | 13 | $ echo cc > b |
|
14 | 14 | $ hg qnew -f foo.diff |
|
15 | 15 | $ echo b > b |
|
16 | 16 | $ hg qrefresh |
|
17 | 17 | |
|
18 |
$ hg debugindex |
|
|
18 | $ hg debugindex b | |
|
19 | 19 | rev offset length base linkrev nodeid p1 p2 |
|
20 | 20 | 0 0 3 0 0 1e88685f5dde 000000000000 000000000000 |
|
21 | 21 |
@@ -1,148 +1,148 b'' | |||
|
1 | 1 | This test makes sure that we don't mark a file as merged with its ancestor |
|
2 | 2 | when we do a merge. |
|
3 | 3 | |
|
4 | 4 | $ cat <<EOF > merge |
|
5 | 5 | > import sys, os |
|
6 | 6 | > print "merging for", os.path.basename(sys.argv[1]) |
|
7 | 7 | > EOF |
|
8 | 8 | $ HGMERGE="python ../merge"; export HGMERGE |
|
9 | 9 | |
|
10 | 10 | Creating base: |
|
11 | 11 | |
|
12 | 12 | $ hg init a |
|
13 | 13 | $ cd a |
|
14 | 14 | $ echo 1 > foo |
|
15 | 15 | $ echo 1 > bar |
|
16 | 16 | $ echo 1 > baz |
|
17 | 17 | $ echo 1 > quux |
|
18 | 18 | $ hg add foo bar baz quux |
|
19 | 19 | $ hg commit -m "base" |
|
20 | 20 | |
|
21 | 21 | $ cd .. |
|
22 | 22 | $ hg clone a b |
|
23 | 23 | updating to branch default |
|
24 | 24 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 25 | |
|
26 | 26 | Creating branch a: |
|
27 | 27 | |
|
28 | 28 | $ cd a |
|
29 | 29 | $ echo 2a > foo |
|
30 | 30 | $ echo 2a > bar |
|
31 | 31 | $ hg commit -m "branch a" |
|
32 | 32 | |
|
33 | 33 | Creating branch b: |
|
34 | 34 | |
|
35 | 35 | $ cd .. |
|
36 | 36 | $ cd b |
|
37 | 37 | $ echo 2b > foo |
|
38 | 38 | $ echo 2b > baz |
|
39 | 39 | $ hg commit -m "branch b" |
|
40 | 40 | |
|
41 | 41 | We shouldn't have anything but n state here: |
|
42 | 42 | |
|
43 | 43 | $ hg debugstate --nodates | grep -v "^n" |
|
44 | 44 | [1] |
|
45 | 45 | |
|
46 | 46 | Merging: |
|
47 | 47 | |
|
48 | 48 | $ hg pull ../a |
|
49 | 49 | pulling from ../a |
|
50 | 50 | searching for changes |
|
51 | 51 | adding changesets |
|
52 | 52 | adding manifests |
|
53 | 53 | adding file changes |
|
54 | 54 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
55 | 55 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
56 | 56 | |
|
57 | 57 | $ hg merge -v |
|
58 | 58 | resolving manifests |
|
59 | 59 | getting bar |
|
60 | 60 | merging foo |
|
61 | 61 | merging for foo |
|
62 | 62 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
63 | 63 | (branch merge, don't forget to commit) |
|
64 | 64 | |
|
65 | 65 | $ echo 2m > foo |
|
66 | 66 | $ echo 2b > baz |
|
67 | 67 | $ echo new > quux |
|
68 | 68 | |
|
69 | 69 | We shouldn't have anything but foo in merge state here: |
|
70 | 70 | |
|
71 | 71 | $ hg debugstate --nodates | grep "^m" |
|
72 | 72 | m 644 3 foo |
|
73 | 73 | |
|
74 | 74 | $ hg ci -m "merge" |
|
75 | 75 | |
|
76 | 76 | main: we should have a merge here: |
|
77 | 77 | |
|
78 | 78 | $ hg debugindex .hg/store/00changelog.i |
|
79 | 79 | rev offset length base linkrev nodeid p1 p2 |
|
80 | 80 | 0 0 73 0 0 cdca01651b96 000000000000 000000000000 |
|
81 | 81 | 1 73 68 1 1 f6718a9cb7f3 cdca01651b96 000000000000 |
|
82 | 82 | 2 141 68 2 2 bdd988058d16 cdca01651b96 000000000000 |
|
83 | 83 | 3 209 66 3 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 |
|
84 | 84 | |
|
85 | 85 | log should show foo and quux changed: |
|
86 | 86 | |
|
87 | 87 | $ hg log -v -r tip |
|
88 | 88 | changeset: 3:d8a521142a3c |
|
89 | 89 | tag: tip |
|
90 | 90 | parent: 1:f6718a9cb7f3 |
|
91 | 91 | parent: 2:bdd988058d16 |
|
92 | 92 | user: test |
|
93 | 93 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
94 | 94 | files: foo quux |
|
95 | 95 | description: |
|
96 | 96 | merge |
|
97 | 97 | |
|
98 | 98 | |
|
99 | 99 | |
|
100 | 100 | foo: we should have a merge here: |
|
101 | 101 | |
|
102 |
$ hg debugindex |
|
|
102 | $ hg debugindex foo | |
|
103 | 103 | rev offset length base linkrev nodeid p1 p2 |
|
104 | 104 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
105 | 105 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
|
106 | 106 | 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000 |
|
107 | 107 | 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a |
|
108 | 108 | |
|
109 | 109 | bar: we should not have a merge here: |
|
110 | 110 | |
|
111 |
$ hg debugindex |
|
|
111 | $ hg debugindex bar | |
|
112 | 112 | rev offset length base linkrev nodeid p1 p2 |
|
113 | 113 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
114 | 114 | 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000 |
|
115 | 115 | |
|
116 | 116 | baz: we should not have a merge here: |
|
117 | 117 | |
|
118 |
$ hg debugindex |
|
|
118 | $ hg debugindex baz | |
|
119 | 119 | rev offset length base linkrev nodeid p1 p2 |
|
120 | 120 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
121 | 121 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
|
122 | 122 | |
|
123 | 123 | quux: we should not have a merge here: |
|
124 | 124 | |
|
125 |
$ hg debugindex |
|
|
125 | $ hg debugindex quux | |
|
126 | 126 | rev offset length base linkrev nodeid p1 p2 |
|
127 | 127 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
128 | 128 | 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000 |
|
129 | 129 | |
|
130 | 130 | Manifest entries should match tips of all files: |
|
131 | 131 | |
|
132 | 132 | $ hg manifest --debug |
|
133 | 133 | 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar |
|
134 | 134 | 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz |
|
135 | 135 | aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo |
|
136 | 136 | 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux |
|
137 | 137 | |
|
138 | 138 | Everything should be clean now: |
|
139 | 139 | |
|
140 | 140 | $ hg status |
|
141 | 141 | |
|
142 | 142 | $ hg verify |
|
143 | 143 | checking changesets |
|
144 | 144 | checking manifests |
|
145 | 145 | crosschecking files in changesets and manifests |
|
146 | 146 | checking files |
|
147 | 147 | 4 files, 4 changesets, 10 total revisions |
|
148 | 148 |
@@ -1,147 +1,147 b'' | |||
|
1 | 1 | $ umask 027 |
|
2 | 2 | |
|
3 | 3 | $ hg init test1 |
|
4 | 4 | $ cd test1 |
|
5 | 5 | $ touch a b |
|
6 | 6 | $ hg add a b |
|
7 | 7 | $ hg ci -m "added a b" |
|
8 | 8 | |
|
9 | 9 | $ cd .. |
|
10 | 10 | $ hg clone test1 test3 |
|
11 | 11 | updating to branch default |
|
12 | 12 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 13 | |
|
14 | 14 | $ hg init test2 |
|
15 | 15 | $ cd test2 |
|
16 | 16 | $ hg pull ../test1 |
|
17 | 17 | pulling from ../test1 |
|
18 | 18 | requesting all changes |
|
19 | 19 | adding changesets |
|
20 | 20 | adding manifests |
|
21 | 21 | adding file changes |
|
22 | 22 | added 1 changesets with 2 changes to 2 files |
|
23 | 23 | (run 'hg update' to get a working copy) |
|
24 | 24 | $ hg co |
|
25 | 25 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 26 | $ chmod +x a |
|
27 | 27 | $ hg ci -m "chmod +x a" |
|
28 | 28 | |
|
29 | 29 | the changelog should mention file a: |
|
30 | 30 | |
|
31 | 31 | $ hg tip --template '{files}\n' |
|
32 | 32 | a |
|
33 | 33 | |
|
34 | 34 | $ cd ../test1 |
|
35 | 35 | $ echo 123 >>a |
|
36 | 36 | $ hg ci -m "a updated" |
|
37 | 37 | |
|
38 | 38 | $ hg pull ../test2 |
|
39 | 39 | pulling from ../test2 |
|
40 | 40 | searching for changes |
|
41 | 41 | adding changesets |
|
42 | 42 | adding manifests |
|
43 | 43 | adding file changes |
|
44 | 44 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
45 | 45 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
46 | 46 | $ hg heads |
|
47 | 47 | changeset: 2:7f4313b42a34 |
|
48 | 48 | tag: tip |
|
49 | 49 | parent: 0:22a449e20da5 |
|
50 | 50 | user: test |
|
51 | 51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 | 52 | summary: chmod +x a |
|
53 | 53 | |
|
54 | 54 | changeset: 1:c6ecefc45368 |
|
55 | 55 | user: test |
|
56 | 56 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
57 | 57 | summary: a updated |
|
58 | 58 | |
|
59 | 59 | $ hg history |
|
60 | 60 | changeset: 2:7f4313b42a34 |
|
61 | 61 | tag: tip |
|
62 | 62 | parent: 0:22a449e20da5 |
|
63 | 63 | user: test |
|
64 | 64 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
65 | 65 | summary: chmod +x a |
|
66 | 66 | |
|
67 | 67 | changeset: 1:c6ecefc45368 |
|
68 | 68 | user: test |
|
69 | 69 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
70 | 70 | summary: a updated |
|
71 | 71 | |
|
72 | 72 | changeset: 0:22a449e20da5 |
|
73 | 73 | user: test |
|
74 | 74 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
75 | 75 | summary: added a b |
|
76 | 76 | |
|
77 | 77 | |
|
78 | 78 | $ hg -v merge |
|
79 | 79 | resolving manifests |
|
80 | 80 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
81 | 81 | (branch merge, don't forget to commit) |
|
82 | 82 | |
|
83 | 83 | $ cd ../test3 |
|
84 | 84 | $ echo 123 >>b |
|
85 | 85 | $ hg ci -m "b updated" |
|
86 | 86 | |
|
87 | 87 | $ hg pull ../test2 |
|
88 | 88 | pulling from ../test2 |
|
89 | 89 | searching for changes |
|
90 | 90 | adding changesets |
|
91 | 91 | adding manifests |
|
92 | 92 | adding file changes |
|
93 | 93 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
94 | 94 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
95 | 95 | $ hg heads |
|
96 | 96 | changeset: 2:7f4313b42a34 |
|
97 | 97 | tag: tip |
|
98 | 98 | parent: 0:22a449e20da5 |
|
99 | 99 | user: test |
|
100 | 100 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
101 | 101 | summary: chmod +x a |
|
102 | 102 | |
|
103 | 103 | changeset: 1:dc57ead75f79 |
|
104 | 104 | user: test |
|
105 | 105 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
106 | 106 | summary: b updated |
|
107 | 107 | |
|
108 | 108 | $ hg history |
|
109 | 109 | changeset: 2:7f4313b42a34 |
|
110 | 110 | tag: tip |
|
111 | 111 | parent: 0:22a449e20da5 |
|
112 | 112 | user: test |
|
113 | 113 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
114 | 114 | summary: chmod +x a |
|
115 | 115 | |
|
116 | 116 | changeset: 1:dc57ead75f79 |
|
117 | 117 | user: test |
|
118 | 118 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
119 | 119 | summary: b updated |
|
120 | 120 | |
|
121 | 121 | changeset: 0:22a449e20da5 |
|
122 | 122 | user: test |
|
123 | 123 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
124 | 124 | summary: added a b |
|
125 | 125 | |
|
126 | 126 | |
|
127 | 127 | $ hg -v merge |
|
128 | 128 | resolving manifests |
|
129 | 129 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
130 | 130 | (branch merge, don't forget to commit) |
|
131 | 131 | |
|
132 | 132 | $ ls -l ../test[123]/a > foo |
|
133 | 133 | $ cut -b 1-10 < foo |
|
134 | 134 | -rwxr-x--- |
|
135 | 135 | -rwxr-x--- |
|
136 | 136 | -rwxr-x--- |
|
137 | 137 | |
|
138 |
$ hg debugindex |
|
|
138 | $ hg debugindex a | |
|
139 | 139 | rev offset length base linkrev nodeid p1 p2 |
|
140 | 140 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
141 |
$ hg debugindex ../test2 |
|
|
141 | $ hg debugindex -R ../test2 a | |
|
142 | 142 | rev offset length base linkrev nodeid p1 p2 |
|
143 | 143 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
144 |
$ hg debugindex ../test1 |
|
|
144 | $ hg debugindex -R ../test1 a | |
|
145 | 145 | rev offset length base linkrev nodeid p1 p2 |
|
146 | 146 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
147 | 147 | 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000 |
@@ -1,56 +1,56 b'' | |||
|
1 | 1 | http://mercurial.selenic.com/bts/issue522 |
|
2 | 2 | |
|
3 | 3 | In the merge below, the file "foo" has the same contents in both |
|
4 | 4 | parents, but if we look at the file-level history, we'll notice that |
|
5 | 5 | the version in p1 is an ancestor of the version in p2. This test makes |
|
6 | 6 | sure that we'll use the version from p2 in the manifest of the merge |
|
7 | 7 | revision. |
|
8 | 8 | |
|
9 | 9 | $ hg init |
|
10 | 10 | |
|
11 | 11 | $ echo foo > foo |
|
12 | 12 | $ hg ci -qAm 'add foo' |
|
13 | 13 | |
|
14 | 14 | $ echo bar >> foo |
|
15 | 15 | $ hg ci -m 'change foo' |
|
16 | 16 | |
|
17 | 17 | $ hg backout -r tip -m 'backout changed foo' |
|
18 | 18 | reverting foo |
|
19 | 19 | changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e |
|
20 | 20 | |
|
21 | 21 | $ hg up -C 0 |
|
22 | 22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 23 | |
|
24 | 24 | $ touch bar |
|
25 | 25 | $ hg ci -qAm 'add bar' |
|
26 | 26 | |
|
27 | 27 | $ hg merge --debug |
|
28 | 28 | searching for copies back to rev 1 |
|
29 | 29 | unmatched files in local: |
|
30 | 30 | bar |
|
31 | 31 | resolving manifests |
|
32 | 32 | overwrite None partial False |
|
33 | 33 | ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee |
|
34 | 34 | foo: remote is newer -> g |
|
35 | 35 | updating: foo 1/1 files (100.00%) |
|
36 | 36 | getting foo |
|
37 | 37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 38 | (branch merge, don't forget to commit) |
|
39 | 39 | |
|
40 | 40 | $ hg debugstate | grep foo |
|
41 | 41 | n 0 -2 unset foo |
|
42 | 42 | |
|
43 | 43 | $ hg st -A foo |
|
44 | 44 | M foo |
|
45 | 45 | |
|
46 | 46 | $ hg ci -m 'merge' |
|
47 | 47 | |
|
48 | 48 | $ hg manifest --debug | grep foo |
|
49 | 49 | c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo |
|
50 | 50 | |
|
51 |
$ hg debugindex |
|
|
51 | $ hg debugindex foo | |
|
52 | 52 | rev offset length base linkrev nodeid p1 p2 |
|
53 | 53 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
54 | 54 | 1 5 9 1 1 6f4310b00b9a 2ed2a3912a0b 000000000000 |
|
55 | 55 | 2 14 5 2 2 c6fc755d7e68 6f4310b00b9a 000000000000 |
|
56 | 56 |
@@ -1,183 +1,183 b'' | |||
|
1 | 1 | Check that renames are correctly saved by a commit after a merge |
|
2 | 2 | |
|
3 | 3 | Test with the merge on 3 having the rename on the local parent |
|
4 | 4 | |
|
5 | 5 | $ hg init a |
|
6 | 6 | $ cd a |
|
7 | 7 | |
|
8 | 8 | $ echo line1 > foo |
|
9 | 9 | $ hg add foo |
|
10 | 10 | $ hg ci -m '0: add foo' |
|
11 | 11 | |
|
12 | 12 | $ echo line2 >> foo |
|
13 | 13 | $ hg ci -m '1: change foo' |
|
14 | 14 | |
|
15 | 15 | $ hg up -C 0 |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | $ hg mv foo bar |
|
19 | 19 | $ rm bar |
|
20 | 20 | $ echo line0 > bar |
|
21 | 21 | $ echo line1 >> bar |
|
22 | 22 | $ hg ci -m '2: mv foo bar; change bar' |
|
23 | 23 | created new head |
|
24 | 24 | |
|
25 | 25 | $ hg merge 1 |
|
26 | 26 | merging bar and foo to bar |
|
27 | 27 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | (branch merge, don't forget to commit) |
|
29 | 29 | |
|
30 | 30 | $ cat bar |
|
31 | 31 | line0 |
|
32 | 32 | line1 |
|
33 | 33 | line2 |
|
34 | 34 | |
|
35 | 35 | $ hg ci -m '3: merge with local rename' |
|
36 | 36 | |
|
37 |
$ hg debugindex |
|
|
37 | $ hg debugindex bar | |
|
38 | 38 | rev offset length base linkrev nodeid p1 p2 |
|
39 | 39 | 0 0 77 0 2 d35118874825 000000000000 000000000000 |
|
40 | 40 | 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825 |
|
41 | 41 | |
|
42 | 42 | $ hg debugrename bar |
|
43 | 43 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
44 | 44 | |
|
45 |
$ hg debugindex |
|
|
45 | $ hg debugindex foo | |
|
46 | 46 | rev offset length base linkrev nodeid p1 p2 |
|
47 | 47 | 0 0 7 0 0 690b295714ae 000000000000 000000000000 |
|
48 | 48 | 1 7 13 1 1 9e25c27b8757 690b295714ae 000000000000 |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | Revert the content change from rev 2: |
|
52 | 52 | |
|
53 | 53 | $ hg up -C 2 |
|
54 | 54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 55 | $ rm bar |
|
56 | 56 | $ echo line1 > bar |
|
57 | 57 | $ hg ci -m '4: revert content change from rev 2' |
|
58 | 58 | created new head |
|
59 | 59 | |
|
60 | 60 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
61 | 61 | 4:2263c1be0967 2:0f2ff26688b9 |
|
62 | 62 | 3:0555950ead28 2:0f2ff26688b9 1:5cd961e4045d |
|
63 | 63 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
64 | 64 | 1:5cd961e4045d |
|
65 | 65 | 0:2665aaee66e9 |
|
66 | 66 | |
|
67 | 67 | This should use bar@rev2 as the ancestor: |
|
68 | 68 | |
|
69 | 69 | $ hg --debug merge 3 |
|
70 | 70 | searching for copies back to rev 1 |
|
71 | 71 | resolving manifests |
|
72 | 72 | overwrite None partial False |
|
73 | 73 | ancestor 0f2ff26688b9 local 2263c1be0967+ remote 0555950ead28 |
|
74 | 74 | bar: versions differ -> m |
|
75 | 75 | preserving bar for resolve of bar |
|
76 | 76 | updating: bar 1/1 files (100.00%) |
|
77 | 77 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
78 | 78 | merging bar |
|
79 | 79 | my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9 |
|
80 | 80 | premerge successful |
|
81 | 81 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
82 | 82 | (branch merge, don't forget to commit) |
|
83 | 83 | |
|
84 | 84 | $ cat bar |
|
85 | 85 | line1 |
|
86 | 86 | line2 |
|
87 | 87 | |
|
88 | 88 | $ hg ci -m '5: merge' |
|
89 | 89 | |
|
90 |
$ hg debugindex |
|
|
90 | $ hg debugindex bar | |
|
91 | 91 | rev offset length base linkrev nodeid p1 p2 |
|
92 | 92 | 0 0 77 0 2 d35118874825 000000000000 000000000000 |
|
93 | 93 | 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825 |
|
94 | 94 | 2 153 7 2 4 ff4b45017382 d35118874825 000000000000 |
|
95 | 95 | 3 160 13 3 5 3701b4893544 ff4b45017382 5345f5ab8abd |
|
96 | 96 | |
|
97 | 97 | |
|
98 | 98 | Same thing, but with the merge on 3 having the rename |
|
99 | 99 | on the remote parent: |
|
100 | 100 | |
|
101 | 101 | $ cd .. |
|
102 | 102 | $ hg clone -U -r 1 -r 2 a b |
|
103 | 103 | adding changesets |
|
104 | 104 | adding manifests |
|
105 | 105 | adding file changes |
|
106 | 106 | added 3 changesets with 3 changes to 2 files (+1 heads) |
|
107 | 107 | $ cd b |
|
108 | 108 | |
|
109 | 109 | $ hg up -C 1 |
|
110 | 110 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
111 | 111 | |
|
112 | 112 | $ hg merge 2 |
|
113 | 113 | merging foo and bar to bar |
|
114 | 114 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
115 | 115 | (branch merge, don't forget to commit) |
|
116 | 116 | |
|
117 | 117 | $ cat bar |
|
118 | 118 | line0 |
|
119 | 119 | line1 |
|
120 | 120 | line2 |
|
121 | 121 | |
|
122 | 122 | $ hg ci -m '3: merge with remote rename' |
|
123 | 123 | |
|
124 |
$ hg debugindex |
|
|
124 | $ hg debugindex bar | |
|
125 | 125 | rev offset length base linkrev nodeid p1 p2 |
|
126 | 126 | 0 0 77 0 2 d35118874825 000000000000 000000000000 |
|
127 | 127 | 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825 |
|
128 | 128 | |
|
129 | 129 | $ hg debugrename bar |
|
130 | 130 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
131 | 131 | |
|
132 |
$ hg debugindex |
|
|
132 | $ hg debugindex foo | |
|
133 | 133 | rev offset length base linkrev nodeid p1 p2 |
|
134 | 134 | 0 0 7 0 0 690b295714ae 000000000000 000000000000 |
|
135 | 135 | 1 7 13 1 1 9e25c27b8757 690b295714ae 000000000000 |
|
136 | 136 | |
|
137 | 137 | |
|
138 | 138 | Revert the content change from rev 2: |
|
139 | 139 | |
|
140 | 140 | $ hg up -C 2 |
|
141 | 141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
142 | 142 | $ rm bar |
|
143 | 143 | $ echo line1 > bar |
|
144 | 144 | $ hg ci -m '4: revert content change from rev 2' |
|
145 | 145 | created new head |
|
146 | 146 | |
|
147 | 147 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
148 | 148 | 4:2263c1be0967 2:0f2ff26688b9 |
|
149 | 149 | 3:3ffa6b9e35f0 1:5cd961e4045d 2:0f2ff26688b9 |
|
150 | 150 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
151 | 151 | 1:5cd961e4045d |
|
152 | 152 | 0:2665aaee66e9 |
|
153 | 153 | |
|
154 | 154 | This should use bar@rev2 as the ancestor: |
|
155 | 155 | |
|
156 | 156 | $ hg --debug merge 3 |
|
157 | 157 | searching for copies back to rev 1 |
|
158 | 158 | resolving manifests |
|
159 | 159 | overwrite None partial False |
|
160 | 160 | ancestor 0f2ff26688b9 local 2263c1be0967+ remote 3ffa6b9e35f0 |
|
161 | 161 | bar: versions differ -> m |
|
162 | 162 | preserving bar for resolve of bar |
|
163 | 163 | updating: bar 1/1 files (100.00%) |
|
164 | 164 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
165 | 165 | merging bar |
|
166 | 166 | my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9 |
|
167 | 167 | premerge successful |
|
168 | 168 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
169 | 169 | (branch merge, don't forget to commit) |
|
170 | 170 | |
|
171 | 171 | $ cat bar |
|
172 | 172 | line1 |
|
173 | 173 | line2 |
|
174 | 174 | |
|
175 | 175 | $ hg ci -m '5: merge' |
|
176 | 176 | |
|
177 |
$ hg debugindex |
|
|
177 | $ hg debugindex bar | |
|
178 | 178 | rev offset length base linkrev nodeid p1 p2 |
|
179 | 179 | 0 0 77 0 2 d35118874825 000000000000 000000000000 |
|
180 | 180 | 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825 |
|
181 | 181 | 2 153 7 2 4 ff4b45017382 d35118874825 000000000000 |
|
182 | 182 | 3 160 13 3 5 3701b4893544 ff4b45017382 5345f5ab8abd |
|
183 | 183 |
@@ -1,145 +1,145 b'' | |||
|
1 | 1 | initial |
|
2 | 2 | $ hg init test-a |
|
3 | 3 | $ cd test-a |
|
4 | 4 | $ cat >test.txt <<"EOF" |
|
5 | 5 | > 1 |
|
6 | 6 | > 2 |
|
7 | 7 | > 3 |
|
8 | 8 | > EOF |
|
9 | 9 | $ hg add test.txt |
|
10 | 10 | $ hg commit -m "Initial" |
|
11 | 11 | |
|
12 | 12 | clone |
|
13 | 13 | $ cd .. |
|
14 | 14 | $ hg clone test-a test-b |
|
15 | 15 | updating to branch default |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | change test-a |
|
19 | 19 | $ cd test-a |
|
20 | 20 | $ cat >test.txt <<"EOF" |
|
21 | 21 | > one |
|
22 | 22 | > two |
|
23 | 23 | > three |
|
24 | 24 | > EOF |
|
25 | 25 | $ hg commit -m "Numbers as words" |
|
26 | 26 | |
|
27 | 27 | change test-b |
|
28 | 28 | $ cd ../test-b |
|
29 | 29 | $ cat >test.txt <<"EOF" |
|
30 | 30 | > 1 |
|
31 | 31 | > 2.5 |
|
32 | 32 | > 3 |
|
33 | 33 | > EOF |
|
34 | 34 | $ hg commit -m "2 -> 2.5" |
|
35 | 35 | |
|
36 | 36 | now pull and merge from test-a |
|
37 | 37 | $ hg pull ../test-a |
|
38 | 38 | pulling from ../test-a |
|
39 | 39 | searching for changes |
|
40 | 40 | adding changesets |
|
41 | 41 | adding manifests |
|
42 | 42 | adding file changes |
|
43 | 43 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
44 | 44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
45 | 45 | $ hg merge |
|
46 | 46 | merging test.txt |
|
47 | 47 | warning: conflicts during merge. |
|
48 | 48 | merging test.txt failed! |
|
49 | 49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
50 | 50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
51 | 51 | [1] |
|
52 | 52 | resolve conflict |
|
53 | 53 | $ cat >test.txt <<"EOF" |
|
54 | 54 | > one |
|
55 | 55 | > two-point-five |
|
56 | 56 | > three |
|
57 | 57 | > EOF |
|
58 | 58 | $ rm -f *.orig |
|
59 | 59 | $ hg resolve -m test.txt |
|
60 | 60 | $ hg commit -m "Merge 1" |
|
61 | 61 | |
|
62 | 62 | change test-a again |
|
63 | 63 | $ cd ../test-a |
|
64 | 64 | $ cat >test.txt <<"EOF" |
|
65 | 65 | > one |
|
66 | 66 | > two-point-one |
|
67 | 67 | > three |
|
68 | 68 | > EOF |
|
69 | 69 | $ hg commit -m "two -> two-point-one" |
|
70 | 70 | |
|
71 | 71 | pull and merge from test-a again |
|
72 | 72 | $ cd ../test-b |
|
73 | 73 | $ hg pull ../test-a |
|
74 | 74 | pulling from ../test-a |
|
75 | 75 | searching for changes |
|
76 | 76 | adding changesets |
|
77 | 77 | adding manifests |
|
78 | 78 | adding file changes |
|
79 | 79 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
80 | 80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
81 | 81 | $ hg merge --debug |
|
82 | 82 | searching for copies back to rev 1 |
|
83 | 83 | resolving manifests |
|
84 | 84 | overwrite None partial False |
|
85 | 85 | ancestor 96b70246a118 local 50c3a7e29886+ remote 40d11a4173a8 |
|
86 | 86 | test.txt: versions differ -> m |
|
87 | 87 | preserving test.txt for resolve of test.txt |
|
88 | 88 | updating: test.txt 1/1 files (100.00%) |
|
89 | 89 | picked tool 'internal:merge' for test.txt (binary False symlink False) |
|
90 | 90 | merging test.txt |
|
91 | 91 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 |
|
92 | 92 | warning: conflicts during merge. |
|
93 | 93 | merging test.txt failed! |
|
94 | 94 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
95 | 95 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
96 | 96 | [1] |
|
97 | 97 | |
|
98 | 98 | $ cat test.txt |
|
99 | 99 | one |
|
100 | 100 | <<<<<<< local |
|
101 | 101 | two-point-five |
|
102 | 102 | ======= |
|
103 | 103 | two-point-one |
|
104 | 104 | >>>>>>> other |
|
105 | 105 | three |
|
106 | 106 | |
|
107 |
$ hg debugindex |
|
|
107 | $ hg debugindex test.txt | |
|
108 | 108 | rev offset length base linkrev nodeid p1 p2 |
|
109 | 109 | 0 0 7 0 0 01365c4cca56 000000000000 000000000000 |
|
110 | 110 | 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000 |
|
111 | 111 | 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000 |
|
112 | 112 | 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557 |
|
113 | 113 | 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 |
|
114 | 114 | |
|
115 | 115 | $ hg log |
|
116 | 116 | changeset: 4:40d11a4173a8 |
|
117 | 117 | tag: tip |
|
118 | 118 | parent: 2:96b70246a118 |
|
119 | 119 | user: test |
|
120 | 120 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
121 | 121 | summary: two -> two-point-one |
|
122 | 122 | |
|
123 | 123 | changeset: 3:50c3a7e29886 |
|
124 | 124 | parent: 1:d1e159716d41 |
|
125 | 125 | parent: 2:96b70246a118 |
|
126 | 126 | user: test |
|
127 | 127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 128 | summary: Merge 1 |
|
129 | 129 | |
|
130 | 130 | changeset: 2:96b70246a118 |
|
131 | 131 | parent: 0:b1832b9d912a |
|
132 | 132 | user: test |
|
133 | 133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
134 | 134 | summary: Numbers as words |
|
135 | 135 | |
|
136 | 136 | changeset: 1:d1e159716d41 |
|
137 | 137 | user: test |
|
138 | 138 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
139 | 139 | summary: 2 -> 2.5 |
|
140 | 140 | |
|
141 | 141 | changeset: 0:b1832b9d912a |
|
142 | 142 | user: test |
|
143 | 143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
144 | 144 | summary: Initial |
|
145 | 145 |
@@ -1,157 +1,157 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | |
|
3 | 3 | $ echo "[merge]" >> .hg/hgrc |
|
4 | 4 | $ echo "followcopies = 1" >> .hg/hgrc |
|
5 | 5 | |
|
6 | 6 | $ echo foo > a |
|
7 | 7 | $ echo foo > a2 |
|
8 | 8 | $ hg add a a2 |
|
9 | 9 | $ hg ci -m "start" |
|
10 | 10 | |
|
11 | 11 | $ hg mv a b |
|
12 | 12 | $ hg mv a2 b2 |
|
13 | 13 | $ hg ci -m "rename" |
|
14 | 14 | |
|
15 | 15 | $ hg co 0 |
|
16 | 16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | $ echo blahblah > a |
|
19 | 19 | $ echo blahblah > a2 |
|
20 | 20 | $ hg mv a2 c2 |
|
21 | 21 | $ hg ci -m "modify" |
|
22 | 22 | created new head |
|
23 | 23 | |
|
24 | 24 | $ hg merge -y --debug |
|
25 | 25 | searching for copies back to rev 1 |
|
26 | 26 | unmatched files in local: |
|
27 | 27 | c2 |
|
28 | 28 | unmatched files in other: |
|
29 | 29 | b |
|
30 | 30 | b2 |
|
31 | 31 | all copies found (* = to merge, ! = divergent): |
|
32 | 32 | c2 -> a2 ! |
|
33 | 33 | b -> a * |
|
34 | 34 | b2 -> a2 ! |
|
35 | 35 | checking for directory renames |
|
36 | 36 | a2: divergent renames -> dr |
|
37 | 37 | resolving manifests |
|
38 | 38 | overwrite None partial False |
|
39 | 39 | ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c |
|
40 | 40 | a: remote moved to b -> m |
|
41 | 41 | b2: remote created -> g |
|
42 | 42 | preserving a for resolve of b |
|
43 | 43 | removing a |
|
44 | 44 | updating: a 1/3 files (33.33%) |
|
45 | 45 | picked tool 'internal:merge' for b (binary False symlink False) |
|
46 | 46 | merging a and b to b |
|
47 | 47 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c |
|
48 | 48 | premerge successful |
|
49 | 49 | updating: a2 2/3 files (66.67%) |
|
50 | 50 | note: possible conflict - a2 was renamed multiple times to: |
|
51 | 51 | c2 |
|
52 | 52 | b2 |
|
53 | 53 | updating: b2 3/3 files (100.00%) |
|
54 | 54 | getting b2 |
|
55 | 55 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
56 | 56 | (branch merge, don't forget to commit) |
|
57 | 57 | |
|
58 | 58 | $ hg status -AC |
|
59 | 59 | M b |
|
60 | 60 | a |
|
61 | 61 | M b2 |
|
62 | 62 | R a |
|
63 | 63 | C c2 |
|
64 | 64 | |
|
65 | 65 | $ cat b |
|
66 | 66 | blahblah |
|
67 | 67 | |
|
68 | 68 | $ hg ci -m "merge" |
|
69 | 69 | |
|
70 |
$ hg debugindex |
|
|
70 | $ hg debugindex b | |
|
71 | 71 | rev offset length base linkrev nodeid p1 p2 |
|
72 | 72 | 0 0 67 0 1 57eacc201a7f 000000000000 000000000000 |
|
73 | 73 | 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f |
|
74 | 74 | |
|
75 | 75 | $ hg debugrename b |
|
76 | 76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
|
77 | 77 | |
|
78 | 78 | This used to trigger a "divergent renames" warning, despite no renames |
|
79 | 79 | |
|
80 | 80 | $ hg cp b b3 |
|
81 | 81 | $ hg cp b b4 |
|
82 | 82 | $ hg ci -A -m 'copy b twice' |
|
83 | 83 | $ hg up eb92d88a9712 |
|
84 | 84 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
85 | 85 | $ hg up |
|
86 | 86 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 87 | $ hg rm b3 b4 |
|
88 | 88 | $ hg ci -m 'clean up a bit of our mess' |
|
89 | 89 | |
|
90 | 90 | We'd rather not warn on divergent renames done in the same changeset (issue2113) |
|
91 | 91 | |
|
92 | 92 | $ hg cp b b3 |
|
93 | 93 | $ hg mv b b4 |
|
94 | 94 | $ hg ci -A -m 'divergent renames in same changeset' |
|
95 | 95 | $ hg up c761c6948de0 |
|
96 | 96 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
97 | 97 | $ hg up |
|
98 | 98 | note: possible conflict - b was renamed multiple times to: |
|
99 | 99 | b3 |
|
100 | 100 | b4 |
|
101 | 101 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
102 | 102 | |
|
103 | 103 | Check for issue2642 |
|
104 | 104 | |
|
105 | 105 | $ hg init t |
|
106 | 106 | $ cd t |
|
107 | 107 | |
|
108 | 108 | $ echo c0 > f1 |
|
109 | 109 | $ hg ci -Aqm0 |
|
110 | 110 | |
|
111 | 111 | $ hg up null -q |
|
112 | 112 | $ echo c1 > f1 # backport |
|
113 | 113 | $ hg ci -Aqm1 |
|
114 | 114 | $ hg mv f1 f2 |
|
115 | 115 | $ hg ci -qm2 |
|
116 | 116 | |
|
117 | 117 | $ hg up 0 -q |
|
118 | 118 | $ hg merge 1 -q --tool internal:local |
|
119 | 119 | $ hg ci -qm3 |
|
120 | 120 | |
|
121 | 121 | $ hg merge 2 |
|
122 | 122 | merging f1 and f2 to f2 |
|
123 | 123 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
124 | 124 | (branch merge, don't forget to commit) |
|
125 | 125 | |
|
126 | 126 | $ cat f2 |
|
127 | 127 | c0 |
|
128 | 128 | |
|
129 | 129 | Check for issue2089 |
|
130 | 130 | |
|
131 | 131 | $ hg init repo2089 |
|
132 | 132 | $ cd repo2089 |
|
133 | 133 | |
|
134 | 134 | $ echo c0 > f1 |
|
135 | 135 | $ hg ci -Aqm0 |
|
136 | 136 | |
|
137 | 137 | $ hg up null -q |
|
138 | 138 | $ echo c1 > f1 |
|
139 | 139 | $ hg ci -Aqm1 |
|
140 | 140 | |
|
141 | 141 | $ hg up 0 -q |
|
142 | 142 | $ hg merge 1 -q --tool internal:local |
|
143 | 143 | $ echo c2 > f1 |
|
144 | 144 | $ hg ci -qm2 |
|
145 | 145 | |
|
146 | 146 | $ hg up 1 -q |
|
147 | 147 | $ hg mv f1 f2 |
|
148 | 148 | $ hg ci -Aqm3 |
|
149 | 149 | |
|
150 | 150 | $ hg up 2 -q |
|
151 | 151 | $ hg merge 3 |
|
152 | 152 | merging f1 and f2 to f2 |
|
153 | 153 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
154 | 154 | (branch merge, don't forget to commit) |
|
155 | 155 | |
|
156 | 156 | $ cat f2 |
|
157 | 157 | c2 |
@@ -1,21 +1,21 b'' | |||
|
1 | 1 | $ hg init repo |
|
2 | 2 | $ cd repo |
|
3 | 3 | |
|
4 | 4 | $ touch foo |
|
5 | 5 | $ hg ci -Am 'add foo' |
|
6 | 6 | adding foo |
|
7 | 7 | |
|
8 | 8 | $ hg up -C null |
|
9 | 9 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
10 | 10 | |
|
11 | 11 | this should be stored as a delta against rev 0 |
|
12 | 12 | |
|
13 | 13 | $ echo foo bar baz > foo |
|
14 | 14 | $ hg ci -Am 'add foo again' |
|
15 | 15 | adding foo |
|
16 | 16 | created new head |
|
17 | 17 | |
|
18 |
$ hg debugindex |
|
|
18 | $ hg debugindex foo | |
|
19 | 19 | rev offset length base linkrev nodeid p1 p2 |
|
20 | 20 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
21 | 21 | 1 0 24 0 1 0376abec49b8 000000000000 000000000000 |
@@ -1,141 +1,143 b'' | |||
|
1 | 1 | test stripping of filelogs where the linkrev doesn't always increase |
|
2 | 2 | |
|
3 | 3 | $ echo '[extensions]' >> $HGRCPATH |
|
4 | 4 | $ echo 'hgext.mq =' >> $HGRCPATH |
|
5 | 5 | $ hg init orig |
|
6 | 6 | $ cd orig |
|
7 | 7 | $ commit() |
|
8 | 8 | > { |
|
9 | 9 | > hg up -qC null |
|
10 | 10 | > count=1 |
|
11 | 11 | > for i in "$@"; do |
|
12 | 12 | > for f in $i; do |
|
13 | 13 | > echo $count > $f |
|
14 | 14 | > done |
|
15 | 15 | > count=`expr $count + 1` |
|
16 | 16 | > done |
|
17 | 17 | > hg commit -qAm "$*" |
|
18 | 18 | > } |
|
19 | 19 | |
|
20 | 20 | 2 1 0 2 0 1 2 |
|
21 | 21 | |
|
22 | 22 | $ commit '201 210' |
|
23 | 23 | $ commit '102 120' '210' |
|
24 | 24 | $ commit '021' |
|
25 | 25 | $ commit '201' '021 120' |
|
26 | 26 | $ commit '012 021' '102 201' '120 210' |
|
27 | 27 | $ commit 'manifest-file' |
|
28 | 28 | $ commit '102 120' '012 210' '021 201' |
|
29 | 29 | $ commit '201 210' '021 120' '012 102' |
|
30 | 30 | $ HGUSER=another-user; export HGUSER |
|
31 | 31 | $ commit 'manifest-file' |
|
32 | 32 | $ commit '012' 'manifest-file' |
|
33 | 33 | $ cd .. |
|
34 | 34 | $ hg clone -q -U -r -1 -r -2 -r -3 -r -4 -r -6 orig crossed |
|
35 | $ for i in crossed/.hg/store/00manifest.i crossed/.hg/store/data/*.i; do | |
|
36 | > echo $i | |
|
37 | > hg debugindex $i | |
|
38 | > echo | |
|
39 | > done | |
|
40 | crossed/.hg/store/00manifest.i | |
|
35 | $ cd crossed | |
|
36 | $ hg debugindex .hg/store/00manifest.i | |
|
41 | 37 | rev offset length base linkrev nodeid p1 p2 |
|
42 | 38 | 0 0 112 0 0 6f105cbb914d 000000000000 000000000000 |
|
43 | 39 | 1 112 56 1 3 1b55917b3699 000000000000 000000000000 |
|
44 | 40 | 2 168 123 1 1 8f3d04e263e5 000000000000 000000000000 |
|
45 | 41 | 3 291 122 1 2 f0ef8726ac4f 000000000000 000000000000 |
|
46 | 42 | 4 413 87 4 4 0b76e38b4070 000000000000 000000000000 |
|
47 | ||
|
48 | crossed/.hg/store/data/012.i | |
|
43 | ||
|
44 | $ for i in 012 021 102 120 201 210 manifest-file; do | |
|
45 | > echo $i | |
|
46 | > hg debugindex $i | |
|
47 | > echo | |
|
48 | > done | |
|
49 | 012 | |
|
49 | 50 | rev offset length base linkrev nodeid p1 p2 |
|
50 | 51 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
51 | 52 | 1 3 3 1 1 5d9299349fc0 000000000000 000000000000 |
|
52 | 53 | 2 6 3 2 2 2661d26c6496 000000000000 000000000000 |
|
53 | 54 | |
|
54 | crossed/.hg/store/data/021.i | |
|
55 | 021 | |
|
55 | 56 | rev offset length base linkrev nodeid p1 p2 |
|
56 | 57 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
57 | 58 | 1 3 3 1 2 5d9299349fc0 000000000000 000000000000 |
|
58 | 59 | 2 6 3 2 1 2661d26c6496 000000000000 000000000000 |
|
59 | 60 | |
|
60 | crossed/.hg/store/data/102.i | |
|
61 | 102 | |
|
61 | 62 | rev offset length base linkrev nodeid p1 p2 |
|
62 | 63 | 0 0 3 0 1 b8e02f643373 000000000000 000000000000 |
|
63 | 64 | 1 3 3 1 0 5d9299349fc0 000000000000 000000000000 |
|
64 | 65 | 2 6 3 2 2 2661d26c6496 000000000000 000000000000 |
|
65 | 66 | |
|
66 | crossed/.hg/store/data/120.i | |
|
67 | 120 | |
|
67 | 68 | rev offset length base linkrev nodeid p1 p2 |
|
68 | 69 | 0 0 3 0 1 b8e02f643373 000000000000 000000000000 |
|
69 | 70 | 1 3 3 1 2 5d9299349fc0 000000000000 000000000000 |
|
70 | 71 | 2 6 3 2 0 2661d26c6496 000000000000 000000000000 |
|
71 | 72 | |
|
72 | crossed/.hg/store/data/201.i | |
|
73 | 201 | |
|
73 | 74 | rev offset length base linkrev nodeid p1 p2 |
|
74 | 75 | 0 0 3 0 2 b8e02f643373 000000000000 000000000000 |
|
75 | 76 | 1 3 3 1 0 5d9299349fc0 000000000000 000000000000 |
|
76 | 77 | 2 6 3 2 1 2661d26c6496 000000000000 000000000000 |
|
77 | 78 | |
|
78 | crossed/.hg/store/data/210.i | |
|
79 | 210 | |
|
79 | 80 | rev offset length base linkrev nodeid p1 p2 |
|
80 | 81 | 0 0 3 0 2 b8e02f643373 000000000000 000000000000 |
|
81 | 82 | 1 3 3 1 1 5d9299349fc0 000000000000 000000000000 |
|
82 | 83 | 2 6 3 2 0 2661d26c6496 000000000000 000000000000 |
|
83 | 84 | |
|
84 | crossed/.hg/store/data/manifest-file.i | |
|
85 | manifest-file | |
|
85 | 86 | rev offset length base linkrev nodeid p1 p2 |
|
86 | 87 | 0 0 3 0 3 b8e02f643373 000000000000 000000000000 |
|
87 | 88 | 1 3 3 1 4 5d9299349fc0 000000000000 000000000000 |
|
88 | 89 | |
|
90 | $ cd .. | |
|
89 | 91 | $ for i in 0 1 2 3 4; do |
|
90 | 92 | > hg clone -q -U --pull crossed $i |
|
91 | 93 | > echo "% Trying to strip revision $i" |
|
92 | 94 | > hg --cwd $i strip $i |
|
93 | 95 | > echo "% Verifying" |
|
94 | 96 | > hg --cwd $i verify |
|
95 | 97 | > echo |
|
96 | 98 | > done |
|
97 | 99 | % Trying to strip revision 0 |
|
98 | 100 | saved backup bundle to $TESTTMP/0/.hg/strip-backup/*-backup.hg (glob) |
|
99 | 101 | % Verifying |
|
100 | 102 | checking changesets |
|
101 | 103 | checking manifests |
|
102 | 104 | crosschecking files in changesets and manifests |
|
103 | 105 | checking files |
|
104 | 106 | 7 files, 4 changesets, 15 total revisions |
|
105 | 107 | |
|
106 | 108 | % Trying to strip revision 1 |
|
107 | 109 | saved backup bundle to $TESTTMP/1/.hg/strip-backup/*-backup.hg (glob) |
|
108 | 110 | % Verifying |
|
109 | 111 | checking changesets |
|
110 | 112 | checking manifests |
|
111 | 113 | crosschecking files in changesets and manifests |
|
112 | 114 | checking files |
|
113 | 115 | 7 files, 4 changesets, 14 total revisions |
|
114 | 116 | |
|
115 | 117 | % Trying to strip revision 2 |
|
116 | 118 | saved backup bundle to $TESTTMP/2/.hg/strip-backup/*-backup.hg (glob) |
|
117 | 119 | % Verifying |
|
118 | 120 | checking changesets |
|
119 | 121 | checking manifests |
|
120 | 122 | crosschecking files in changesets and manifests |
|
121 | 123 | checking files |
|
122 | 124 | 7 files, 4 changesets, 14 total revisions |
|
123 | 125 | |
|
124 | 126 | % Trying to strip revision 3 |
|
125 | 127 | saved backup bundle to $TESTTMP/3/.hg/strip-backup/*-backup.hg (glob) |
|
126 | 128 | % Verifying |
|
127 | 129 | checking changesets |
|
128 | 130 | checking manifests |
|
129 | 131 | crosschecking files in changesets and manifests |
|
130 | 132 | checking files |
|
131 | 133 | 7 files, 4 changesets, 19 total revisions |
|
132 | 134 | |
|
133 | 135 | % Trying to strip revision 4 |
|
134 | 136 | saved backup bundle to $TESTTMP/4/.hg/strip-backup/*-backup.hg (glob) |
|
135 | 137 | % Verifying |
|
136 | 138 | checking changesets |
|
137 | 139 | checking manifests |
|
138 | 140 | crosschecking files in changesets and manifests |
|
139 | 141 | checking files |
|
140 | 142 | 7 files, 4 changesets, 19 total revisions |
|
141 | 143 |
General Comments 0
You need to be logged in to leave comments.
Login now