Show More
@@ -1,836 +1,836 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH << EOF |
|
2 | 2 | > [phases] |
|
3 | 3 | > # public changeset are not obsolete |
|
4 | 4 | > publish=false |
|
5 | 5 | > [ui] |
|
6 | 6 | > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n" |
|
7 | 7 | > EOF |
|
8 | 8 | $ mkcommit() { |
|
9 | 9 | > echo "$1" > "$1" |
|
10 | 10 | > hg add "$1" |
|
11 | 11 | > hg ci -m "add $1" |
|
12 | 12 | > } |
|
13 | 13 | $ getid() { |
|
14 |
> hg |
|
|
14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" | |
|
15 | 15 | > } |
|
16 | 16 | |
|
17 | 17 | $ cat > debugkeys.py <<EOF |
|
18 | 18 | > def reposetup(ui, repo): |
|
19 | 19 | > class debugkeysrepo(repo.__class__): |
|
20 | 20 | > def listkeys(self, namespace): |
|
21 | 21 | > ui.write('listkeys %s\n' % (namespace,)) |
|
22 | 22 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
23 | 23 | > |
|
24 | 24 | > if repo.local(): |
|
25 | 25 | > repo.__class__ = debugkeysrepo |
|
26 | 26 | > EOF |
|
27 | 27 | |
|
28 | 28 | $ hg init tmpa |
|
29 | 29 | $ cd tmpa |
|
30 | 30 | $ mkcommit kill_me |
|
31 | 31 | |
|
32 | 32 | Checking that the feature is properly disabled |
|
33 | 33 | |
|
34 | 34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
35 | 35 | abort: creating obsolete markers is not enabled on this repo |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | Enabling it |
|
39 | 39 | |
|
40 | 40 | $ cat >> $HGRCPATH << EOF |
|
41 | 41 | > [experimental] |
|
42 | 42 | > evolution=createmarkers,exchange |
|
43 | 43 | > EOF |
|
44 | 44 | |
|
45 | 45 | Killing a single changeset without replacement |
|
46 | 46 | |
|
47 | 47 | $ hg debugobsolete 0 |
|
48 | 48 | abort: changeset references must be full hexadecimal node identifiers |
|
49 | 49 | [255] |
|
50 | 50 | $ hg debugobsolete '00' |
|
51 | 51 | abort: changeset references must be full hexadecimal node identifiers |
|
52 | 52 | [255] |
|
53 | 53 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
54 | 54 | $ hg debugobsolete |
|
55 | 55 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
56 | 56 | |
|
57 | 57 | (test that mercurial is not confused) |
|
58 | 58 | |
|
59 | 59 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
60 | 60 | $ hg tip |
|
61 | 61 | -1:000000000000 (public) [tip ] |
|
62 | 62 | $ hg up --hidden tip --quiet |
|
63 | 63 | |
|
64 | 64 | Killing a single changeset with itself should fail |
|
65 | 65 | (simple local safeguard) |
|
66 | 66 | |
|
67 | 67 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
68 | 68 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
69 | 69 | [255] |
|
70 | 70 | |
|
71 | 71 | $ cd .. |
|
72 | 72 | |
|
73 | 73 | Killing a single changeset with replacement |
|
74 | 74 | (and testing the format option) |
|
75 | 75 | |
|
76 | 76 | $ hg init tmpb |
|
77 | 77 | $ cd tmpb |
|
78 | 78 | $ mkcommit a |
|
79 | 79 | $ mkcommit b |
|
80 | 80 | $ mkcommit original_c |
|
81 | 81 | $ hg up "desc('b')" |
|
82 | 82 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
83 | 83 | $ mkcommit new_c |
|
84 | 84 | created new head |
|
85 | 85 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
86 | 86 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
87 | 87 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
88 | 88 | 2:245bde4270cd add original_c |
|
89 | 89 | $ hg debugrevlog -cd |
|
90 | 90 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
91 | 91 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
92 | 92 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
93 | 93 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
94 | 94 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
95 | 95 | $ hg debugobsolete |
|
96 | 96 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
97 | 97 | |
|
98 | 98 | (check for version number of the obsstore) |
|
99 | 99 | |
|
100 | 100 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
101 | 101 | \x00 (no-eol) (esc) |
|
102 | 102 | |
|
103 | 103 | do it again (it read the obsstore before adding new changeset) |
|
104 | 104 | |
|
105 | 105 | $ hg up '.^' |
|
106 | 106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
107 | 107 | $ mkcommit new_2_c |
|
108 | 108 | created new head |
|
109 | 109 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
110 | 110 | $ hg debugobsolete |
|
111 | 111 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
112 | 112 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
113 | 113 | |
|
114 | 114 | Register two markers with a missing node |
|
115 | 115 | |
|
116 | 116 | $ hg up '.^' |
|
117 | 117 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
118 | 118 | $ mkcommit new_3_c |
|
119 | 119 | created new head |
|
120 | 120 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
121 | 121 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
122 | 122 | $ hg debugobsolete |
|
123 | 123 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
124 | 124 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
125 | 125 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
126 | 126 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
127 | 127 | |
|
128 | 128 | Refuse pathological nullid successors |
|
129 | 129 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
130 | 130 | transaction abort! |
|
131 | 131 | rollback completed |
|
132 | 132 | abort: bad obsolescence marker detected: invalid successors nullid |
|
133 | 133 | [255] |
|
134 | 134 | |
|
135 | 135 | Check that graphlog detect that a changeset is obsolete: |
|
136 | 136 | |
|
137 | 137 | $ hg log -G |
|
138 | 138 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
139 | 139 | | |
|
140 | 140 | o 1:7c3bad9141dc (draft) [ ] add b |
|
141 | 141 | | |
|
142 | 142 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
143 | 143 | |
|
144 | 144 | |
|
145 | 145 | check that heads does not report them |
|
146 | 146 | |
|
147 | 147 | $ hg heads |
|
148 | 148 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
149 | 149 | $ hg heads --hidden |
|
150 | 150 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
151 | 151 | 4:ca819180edb9 (draft) [ ] add new_2_c |
|
152 | 152 | 3:cdbce2fbb163 (draft) [ ] add new_c |
|
153 | 153 | 2:245bde4270cd (draft) [ ] add original_c |
|
154 | 154 | |
|
155 | 155 | |
|
156 | 156 | check that summary does not report them |
|
157 | 157 | |
|
158 | 158 | $ hg init ../sink |
|
159 | 159 | $ echo '[paths]' >> .hg/hgrc |
|
160 | 160 | $ echo 'default=../sink' >> .hg/hgrc |
|
161 | 161 | $ hg summary --remote |
|
162 | 162 | parent: 5:5601fb93a350 tip |
|
163 | 163 | add new_3_c |
|
164 | 164 | branch: default |
|
165 | 165 | commit: (clean) |
|
166 | 166 | update: (current) |
|
167 | 167 | remote: 3 outgoing |
|
168 | 168 | |
|
169 | 169 | $ hg summary --remote --hidden |
|
170 | 170 | parent: 5:5601fb93a350 tip |
|
171 | 171 | add new_3_c |
|
172 | 172 | branch: default |
|
173 | 173 | commit: (clean) |
|
174 | 174 | update: 3 new changesets, 4 branch heads (merge) |
|
175 | 175 | remote: 3 outgoing |
|
176 | 176 | |
|
177 | 177 | check that various commands work well with filtering |
|
178 | 178 | |
|
179 | 179 | $ hg tip |
|
180 | 180 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
181 | 181 | $ hg log -r 6 |
|
182 | 182 | abort: unknown revision '6'! |
|
183 | 183 | [255] |
|
184 | 184 | $ hg log -r 4 |
|
185 | 185 | abort: hidden revision '4'! |
|
186 | 186 | (use --hidden to access hidden revisions) |
|
187 | 187 | [255] |
|
188 | 188 | $ hg debugrevspec 'rev(6)' |
|
189 | 189 | $ hg debugrevspec 'rev(4)' |
|
190 | 190 | |
|
191 | 191 | Check that public changeset are not accounted as obsolete: |
|
192 | 192 | |
|
193 | 193 | $ hg --hidden phase --public 2 |
|
194 | 194 | $ hg log -G |
|
195 | 195 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
196 | 196 | | |
|
197 | 197 | | o 2:245bde4270cd (public) [ ] add original_c |
|
198 | 198 | |/ |
|
199 | 199 | o 1:7c3bad9141dc (public) [ ] add b |
|
200 | 200 | | |
|
201 | 201 | o 0:1f0dee641bb7 (public) [ ] add a |
|
202 | 202 | |
|
203 | 203 | |
|
204 | 204 | And that bumped changeset are detected |
|
205 | 205 | -------------------------------------- |
|
206 | 206 | |
|
207 | 207 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
208 | 208 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
209 | 209 | the public changeset |
|
210 | 210 | |
|
211 | 211 | $ hg log --hidden -r 'bumped()' |
|
212 | 212 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
213 | 213 | |
|
214 | 214 | And that we can't push bumped changeset |
|
215 | 215 | |
|
216 | 216 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
217 | 217 | pushing to ../tmpa |
|
218 | 218 | searching for changes |
|
219 | 219 | warning: repository is unrelated |
|
220 | 220 | adding changesets |
|
221 | 221 | adding manifests |
|
222 | 222 | adding file changes |
|
223 | 223 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
224 | 224 | $ hg push ../tmpa |
|
225 | 225 | pushing to ../tmpa |
|
226 | 226 | searching for changes |
|
227 | 227 | abort: push includes bumped changeset: 5601fb93a350! |
|
228 | 228 | [255] |
|
229 | 229 | |
|
230 | 230 | Fixing "bumped" situation |
|
231 | 231 | We need to create a clone of 5 and add a special marker with a flag |
|
232 | 232 | |
|
233 | 233 | $ hg up '5^' |
|
234 | 234 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
235 | 235 | $ hg revert -ar 5 |
|
236 | 236 | adding new_3_c |
|
237 | 237 | $ hg ci -m 'add n3w_3_c' |
|
238 | 238 | created new head |
|
239 | 239 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
240 | 240 | $ hg log -r 'bumped()' |
|
241 | 241 | $ hg log -G |
|
242 | 242 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
243 | 243 | | |
|
244 | 244 | | o 2:245bde4270cd (public) [ ] add original_c |
|
245 | 245 | |/ |
|
246 | 246 | o 1:7c3bad9141dc (public) [ ] add b |
|
247 | 247 | | |
|
248 | 248 | o 0:1f0dee641bb7 (public) [ ] add a |
|
249 | 249 | |
|
250 | 250 | |
|
251 | 251 | |
|
252 | 252 | |
|
253 | 253 | $ cd .. |
|
254 | 254 | |
|
255 | 255 | Exchange Test |
|
256 | 256 | ============================ |
|
257 | 257 | |
|
258 | 258 | Destination repo does not have any data |
|
259 | 259 | --------------------------------------- |
|
260 | 260 | |
|
261 | 261 | Simple incoming test |
|
262 | 262 | |
|
263 | 263 | $ hg init tmpc |
|
264 | 264 | $ cd tmpc |
|
265 | 265 | $ hg incoming ../tmpb |
|
266 | 266 | comparing with ../tmpb |
|
267 | 267 | 0:1f0dee641bb7 (public) [ ] add a |
|
268 | 268 | 1:7c3bad9141dc (public) [ ] add b |
|
269 | 269 | 2:245bde4270cd (public) [ ] add original_c |
|
270 | 270 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
271 | 271 | |
|
272 | 272 | Try to pull markers |
|
273 | 273 | (extinct changeset are excluded but marker are pushed) |
|
274 | 274 | |
|
275 | 275 | $ hg pull ../tmpb |
|
276 | 276 | pulling from ../tmpb |
|
277 | 277 | requesting all changes |
|
278 | 278 | adding changesets |
|
279 | 279 | adding manifests |
|
280 | 280 | adding file changes |
|
281 | 281 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
282 | 282 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
283 | 283 | $ hg debugobsolete |
|
284 | 284 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
285 | 285 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
286 | 286 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
287 | 287 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
288 | 288 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
289 | 289 | |
|
290 | 290 | Rollback//Transaction support |
|
291 | 291 | |
|
292 | 292 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
293 | 293 | $ hg debugobsolete |
|
294 | 294 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
295 | 295 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
296 | 296 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
297 | 297 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
298 | 298 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
299 | 299 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
300 | 300 | $ hg rollback -n |
|
301 | 301 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
302 | 302 | $ hg rollback |
|
303 | 303 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
304 | 304 | $ hg debugobsolete |
|
305 | 305 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
306 | 306 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
307 | 307 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
308 | 308 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
309 | 309 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
310 | 310 | |
|
311 | 311 | $ cd .. |
|
312 | 312 | |
|
313 | 313 | Try to push markers |
|
314 | 314 | |
|
315 | 315 | $ hg init tmpd |
|
316 | 316 | $ hg -R tmpb push tmpd |
|
317 | 317 | pushing to tmpd |
|
318 | 318 | searching for changes |
|
319 | 319 | adding changesets |
|
320 | 320 | adding manifests |
|
321 | 321 | adding file changes |
|
322 | 322 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
323 | 323 | $ hg -R tmpd debugobsolete | sort |
|
324 | 324 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
325 | 325 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
326 | 326 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
327 | 327 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
328 | 328 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
329 | 329 | |
|
330 | 330 | Check obsolete keys are exchanged only if source has an obsolete store |
|
331 | 331 | |
|
332 | 332 | $ hg init empty |
|
333 | 333 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
334 | 334 | pushing to tmpd |
|
335 | 335 | listkeys phases |
|
336 | 336 | listkeys bookmarks |
|
337 | 337 | no changes found |
|
338 | 338 | listkeys phases |
|
339 | 339 | [1] |
|
340 | 340 | |
|
341 | 341 | clone support |
|
342 | 342 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
343 | 343 | |
|
344 | 344 | $ hg clone tmpb clone-dest |
|
345 | 345 | updating to branch default |
|
346 | 346 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 347 | $ hg -R clone-dest log -G --hidden |
|
348 | 348 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
349 | 349 | | |
|
350 | 350 | | x 5:5601fb93a350 (draft) [ ] add new_3_c |
|
351 | 351 | |/ |
|
352 | 352 | | x 4:ca819180edb9 (draft) [ ] add new_2_c |
|
353 | 353 | |/ |
|
354 | 354 | | x 3:cdbce2fbb163 (draft) [ ] add new_c |
|
355 | 355 | |/ |
|
356 | 356 | | o 2:245bde4270cd (public) [ ] add original_c |
|
357 | 357 | |/ |
|
358 | 358 | o 1:7c3bad9141dc (public) [ ] add b |
|
359 | 359 | | |
|
360 | 360 | o 0:1f0dee641bb7 (public) [ ] add a |
|
361 | 361 | |
|
362 | 362 | $ hg -R clone-dest debugobsolete |
|
363 | 363 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
364 | 364 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
365 | 365 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
366 | 366 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
367 | 367 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
368 | 368 | |
|
369 | 369 | |
|
370 | 370 | Destination repo have existing data |
|
371 | 371 | --------------------------------------- |
|
372 | 372 | |
|
373 | 373 | On pull |
|
374 | 374 | |
|
375 | 375 | $ hg init tmpe |
|
376 | 376 | $ cd tmpe |
|
377 | 377 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
378 | 378 | $ hg pull ../tmpb |
|
379 | 379 | pulling from ../tmpb |
|
380 | 380 | requesting all changes |
|
381 | 381 | adding changesets |
|
382 | 382 | adding manifests |
|
383 | 383 | adding file changes |
|
384 | 384 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
385 | 385 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
386 | 386 | $ hg debugobsolete |
|
387 | 387 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
388 | 388 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
389 | 389 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
390 | 390 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
391 | 391 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
392 | 392 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
393 | 393 | |
|
394 | 394 | |
|
395 | 395 | On push |
|
396 | 396 | |
|
397 | 397 | $ hg push ../tmpc |
|
398 | 398 | pushing to ../tmpc |
|
399 | 399 | searching for changes |
|
400 | 400 | no changes found |
|
401 | 401 | [1] |
|
402 | 402 | $ hg -R ../tmpc debugobsolete |
|
403 | 403 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
404 | 404 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
405 | 405 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
406 | 406 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
407 | 407 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
408 | 408 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
409 | 409 | |
|
410 | 410 | detect outgoing obsolete and unstable |
|
411 | 411 | --------------------------------------- |
|
412 | 412 | |
|
413 | 413 | |
|
414 | 414 | $ hg log -G |
|
415 | 415 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
416 | 416 | | |
|
417 | 417 | | o 2:245bde4270cd (public) [ ] add original_c |
|
418 | 418 | |/ |
|
419 | 419 | o 1:7c3bad9141dc (public) [ ] add b |
|
420 | 420 | | |
|
421 | 421 | o 0:1f0dee641bb7 (public) [ ] add a |
|
422 | 422 | |
|
423 | 423 | $ hg up 'desc("n3w_3_c")' |
|
424 | 424 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
425 | 425 | $ mkcommit original_d |
|
426 | 426 | $ mkcommit original_e |
|
427 | 427 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
428 | 428 | $ hg debugobsolete | grep `getid original_d` |
|
429 | 429 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
430 | 430 | $ hg log -r 'obsolete()' |
|
431 | 431 | 4:94b33453f93b (draft) [ ] add original_d |
|
432 | 432 | $ hg log -G -r '::unstable()' |
|
433 | 433 | @ 5:cda648ca50f5 (draft) [tip ] add original_e |
|
434 | 434 | | |
|
435 | 435 | x 4:94b33453f93b (draft) [ ] add original_d |
|
436 | 436 | | |
|
437 | 437 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
438 | 438 | | |
|
439 | 439 | o 1:7c3bad9141dc (public) [ ] add b |
|
440 | 440 | | |
|
441 | 441 | o 0:1f0dee641bb7 (public) [ ] add a |
|
442 | 442 | |
|
443 | 443 | |
|
444 | 444 | refuse to push obsolete changeset |
|
445 | 445 | |
|
446 | 446 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
447 | 447 | pushing to ../tmpc/ |
|
448 | 448 | searching for changes |
|
449 | 449 | abort: push includes obsolete changeset: 94b33453f93b! |
|
450 | 450 | [255] |
|
451 | 451 | |
|
452 | 452 | refuse to push unstable changeset |
|
453 | 453 | |
|
454 | 454 | $ hg push ../tmpc/ |
|
455 | 455 | pushing to ../tmpc/ |
|
456 | 456 | searching for changes |
|
457 | 457 | abort: push includes unstable changeset: cda648ca50f5! |
|
458 | 458 | [255] |
|
459 | 459 | |
|
460 | 460 | Test that extinct changeset are properly detected |
|
461 | 461 | |
|
462 | 462 | $ hg log -r 'extinct()' |
|
463 | 463 | |
|
464 | 464 | Don't try to push extinct changeset |
|
465 | 465 | |
|
466 | 466 | $ hg init ../tmpf |
|
467 | 467 | $ hg out ../tmpf |
|
468 | 468 | comparing with ../tmpf |
|
469 | 469 | searching for changes |
|
470 | 470 | 0:1f0dee641bb7 (public) [ ] add a |
|
471 | 471 | 1:7c3bad9141dc (public) [ ] add b |
|
472 | 472 | 2:245bde4270cd (public) [ ] add original_c |
|
473 | 473 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
474 | 474 | 4:94b33453f93b (draft) [ ] add original_d |
|
475 | 475 | 5:cda648ca50f5 (draft) [tip ] add original_e |
|
476 | 476 | $ hg push ../tmpf -f # -f because be push unstable too |
|
477 | 477 | pushing to ../tmpf |
|
478 | 478 | searching for changes |
|
479 | 479 | adding changesets |
|
480 | 480 | adding manifests |
|
481 | 481 | adding file changes |
|
482 | 482 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
483 | 483 | |
|
484 | 484 | no warning displayed |
|
485 | 485 | |
|
486 | 486 | $ hg push ../tmpf |
|
487 | 487 | pushing to ../tmpf |
|
488 | 488 | searching for changes |
|
489 | 489 | no changes found |
|
490 | 490 | [1] |
|
491 | 491 | |
|
492 | 492 | Do not warn about new head when the new head is a successors of a remote one |
|
493 | 493 | |
|
494 | 494 | $ hg log -G |
|
495 | 495 | @ 5:cda648ca50f5 (draft) [tip ] add original_e |
|
496 | 496 | | |
|
497 | 497 | x 4:94b33453f93b (draft) [ ] add original_d |
|
498 | 498 | | |
|
499 | 499 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
500 | 500 | | |
|
501 | 501 | | o 2:245bde4270cd (public) [ ] add original_c |
|
502 | 502 | |/ |
|
503 | 503 | o 1:7c3bad9141dc (public) [ ] add b |
|
504 | 504 | | |
|
505 | 505 | o 0:1f0dee641bb7 (public) [ ] add a |
|
506 | 506 | |
|
507 | 507 | $ hg up -q 'desc(n3w_3_c)' |
|
508 | 508 | $ mkcommit obsolete_e |
|
509 | 509 | created new head |
|
510 | 510 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` |
|
511 | 511 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
512 | 512 | comparing with ../tmpf |
|
513 | 513 | searching for changes |
|
514 | 514 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
515 | 515 | $ hg push ../tmpf |
|
516 | 516 | pushing to ../tmpf |
|
517 | 517 | searching for changes |
|
518 | 518 | adding changesets |
|
519 | 519 | adding manifests |
|
520 | 520 | adding file changes |
|
521 | 521 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
522 | 522 | |
|
523 | 523 | test relevance computation |
|
524 | 524 | --------------------------------------- |
|
525 | 525 | |
|
526 | 526 | Checking simple case of "marker relevance". |
|
527 | 527 | |
|
528 | 528 | |
|
529 | 529 | Reminder of the repo situation |
|
530 | 530 | |
|
531 | 531 | $ hg log --hidden --graph |
|
532 | 532 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
533 | 533 | | |
|
534 | 534 | | x 5:cda648ca50f5 (draft) [ ] add original_e |
|
535 | 535 | | | |
|
536 | 536 | | x 4:94b33453f93b (draft) [ ] add original_d |
|
537 | 537 | |/ |
|
538 | 538 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
539 | 539 | | |
|
540 | 540 | | o 2:245bde4270cd (public) [ ] add original_c |
|
541 | 541 | |/ |
|
542 | 542 | o 1:7c3bad9141dc (public) [ ] add b |
|
543 | 543 | | |
|
544 | 544 | o 0:1f0dee641bb7 (public) [ ] add a |
|
545 | 545 | |
|
546 | 546 | |
|
547 | 547 | List of all markers |
|
548 | 548 | |
|
549 | 549 | $ hg debugobsolete |
|
550 | 550 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
551 | 551 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
552 | 552 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
553 | 553 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
554 | 554 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
555 | 555 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
556 | 556 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
557 | 557 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) |
|
558 | 558 | |
|
559 | 559 | List of changesets with no chain |
|
560 | 560 | |
|
561 | 561 | $ hg debugobsolete --hidden --rev ::2 |
|
562 | 562 | |
|
563 | 563 | List of changesets that are included on marker chain |
|
564 | 564 | |
|
565 | 565 | $ hg debugobsolete --hidden --rev 6 |
|
566 | 566 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) |
|
567 | 567 | |
|
568 | 568 | List of changesets with a longer chain, (including a pruned children) |
|
569 | 569 | |
|
570 | 570 | $ hg debugobsolete --hidden --rev 3 |
|
571 | 571 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
572 | 572 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
573 | 573 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
574 | 574 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
575 | 575 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
576 | 576 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
577 | 577 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
578 | 578 | |
|
579 | 579 | List of both |
|
580 | 580 | |
|
581 | 581 | $ hg debugobsolete --hidden --rev 3::6 |
|
582 | 582 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
583 | 583 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
584 | 584 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
585 | 585 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
586 | 586 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
587 | 587 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
588 | 588 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) |
|
589 | 589 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
590 | 590 | |
|
591 | 591 | #if serve |
|
592 | 592 | |
|
593 | 593 | check hgweb does not explode |
|
594 | 594 | ==================================== |
|
595 | 595 | |
|
596 | 596 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
597 | 597 | adding changesets |
|
598 | 598 | adding manifests |
|
599 | 599 | adding file changes |
|
600 | 600 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
601 | 601 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
602 | 602 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
603 | 603 | > do |
|
604 | 604 | > hg debugobsolete $node |
|
605 | 605 | > done |
|
606 | 606 | $ hg up tip |
|
607 | 607 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
608 | 608 | |
|
609 | 609 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
610 | 610 | $ cat hg.pid >> $DAEMON_PIDS |
|
611 | 611 | |
|
612 | 612 | check changelog view |
|
613 | 613 | |
|
614 | 614 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/' |
|
615 | 615 | 200 Script output follows |
|
616 | 616 | |
|
617 | 617 | check graph view |
|
618 | 618 | |
|
619 | 619 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph' |
|
620 | 620 | 200 Script output follows |
|
621 | 621 | |
|
622 | 622 | check filelog view |
|
623 | 623 | |
|
624 |
$ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg |
|
|
624 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | |
|
625 | 625 | 200 Script output follows |
|
626 | 626 | |
|
627 | 627 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68' |
|
628 | 628 | 200 Script output follows |
|
629 | 629 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67' |
|
630 | 630 | 404 Not Found |
|
631 | 631 | [1] |
|
632 | 632 | |
|
633 | 633 | check that web.view config option: |
|
634 | 634 | |
|
635 | 635 | $ "$TESTDIR/killdaemons.py" hg.pid |
|
636 | 636 | $ cat >> .hg/hgrc << EOF |
|
637 | 637 | > [web] |
|
638 | 638 | > view=all |
|
639 | 639 | > EOF |
|
640 | 640 | $ wait |
|
641 | 641 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
642 | 642 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67' |
|
643 | 643 | 200 Script output follows |
|
644 | 644 | $ "$TESTDIR/killdaemons.py" hg.pid |
|
645 | 645 | |
|
646 | 646 | Checking _enable=False warning if obsolete marker exists |
|
647 | 647 | |
|
648 | 648 | $ echo '[experimental]' >> $HGRCPATH |
|
649 | 649 | $ echo "evolution=" >> $HGRCPATH |
|
650 | 650 | $ hg log -r tip |
|
651 | 651 | obsolete feature not enabled but 68 markers found! |
|
652 | 652 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
653 | 653 | |
|
654 | 654 | reenable for later test |
|
655 | 655 | |
|
656 | 656 | $ echo '[experimental]' >> $HGRCPATH |
|
657 | 657 | $ echo "evolution=createmarkers,exchange" >> $HGRCPATH |
|
658 | 658 | |
|
659 | 659 | #endif |
|
660 | 660 | |
|
661 | 661 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
662 | 662 | =============================================================================== |
|
663 | 663 | |
|
664 | 664 | This test issue 3805 |
|
665 | 665 | |
|
666 | 666 | $ hg init repo-issue3805 |
|
667 | 667 | $ cd repo-issue3805 |
|
668 | 668 | $ echo "foo" > foo |
|
669 | 669 | $ hg ci -Am "A" |
|
670 | 670 | adding foo |
|
671 | 671 | $ hg clone . ../other-issue3805 |
|
672 | 672 | updating to branch default |
|
673 | 673 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
674 | 674 | $ echo "bar" >> foo |
|
675 | 675 | $ hg ci --amend |
|
676 | 676 | $ cd ../other-issue3805 |
|
677 | 677 | $ hg log -G |
|
678 | 678 | @ 0:193e9254ce7e (draft) [tip ] A |
|
679 | 679 | |
|
680 | 680 | $ hg log -G -R ../repo-issue3805 |
|
681 | 681 | @ 2:3816541e5485 (draft) [tip ] A |
|
682 | 682 | |
|
683 | 683 | $ hg incoming |
|
684 | 684 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
685 | 685 | searching for changes |
|
686 | 686 | 2:3816541e5485 (draft) [tip ] A |
|
687 | 687 | $ hg incoming --bundle ../issue3805.hg |
|
688 | 688 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
689 | 689 | searching for changes |
|
690 | 690 | 2:3816541e5485 (draft) [tip ] A |
|
691 | 691 | $ hg outgoing |
|
692 | 692 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
693 | 693 | searching for changes |
|
694 | 694 | no changes found |
|
695 | 695 | [1] |
|
696 | 696 | |
|
697 | 697 | #if serve |
|
698 | 698 | |
|
699 | 699 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
700 | 700 | $ cat hg.pid >> $DAEMON_PIDS |
|
701 | 701 | |
|
702 | 702 | $ hg incoming http://localhost:$HGPORT |
|
703 | 703 | comparing with http://localhost:$HGPORT/ |
|
704 | 704 | searching for changes |
|
705 | 705 | 1:3816541e5485 (draft) [tip ] A |
|
706 | 706 | $ hg outgoing http://localhost:$HGPORT |
|
707 | 707 | comparing with http://localhost:$HGPORT/ |
|
708 | 708 | searching for changes |
|
709 | 709 | no changes found |
|
710 | 710 | [1] |
|
711 | 711 | |
|
712 | 712 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
713 | 713 | |
|
714 | 714 | #endif |
|
715 | 715 | |
|
716 | 716 | This test issue 3814 |
|
717 | 717 | |
|
718 | 718 | (nothing to push but locally hidden changeset) |
|
719 | 719 | |
|
720 | 720 | $ cd .. |
|
721 | 721 | $ hg init repo-issue3814 |
|
722 | 722 | $ cd repo-issue3805 |
|
723 | 723 | $ hg push -r 3816541e5485 ../repo-issue3814 |
|
724 | 724 | pushing to ../repo-issue3814 |
|
725 | 725 | searching for changes |
|
726 | 726 | adding changesets |
|
727 | 727 | adding manifests |
|
728 | 728 | adding file changes |
|
729 | 729 | added 1 changesets with 1 changes to 1 files |
|
730 | 730 | $ hg out ../repo-issue3814 |
|
731 | 731 | comparing with ../repo-issue3814 |
|
732 | 732 | searching for changes |
|
733 | 733 | no changes found |
|
734 | 734 | [1] |
|
735 | 735 | |
|
736 | 736 | Test that a local tag blocks a changeset from being hidden |
|
737 | 737 | |
|
738 | 738 | $ hg tag -l visible -r 0 --hidden |
|
739 | 739 | $ hg log -G |
|
740 | 740 | @ 2:3816541e5485 (draft) [tip ] A |
|
741 | 741 | |
|
742 | 742 | x 0:193e9254ce7e (draft) [visible ] A |
|
743 | 743 | |
|
744 | 744 | Test that removing a local tag does not cause some commands to fail |
|
745 | 745 | |
|
746 | 746 | $ hg tag -l -r tip tiptag |
|
747 | 747 | $ hg tags |
|
748 | 748 | tiptag 2:3816541e5485 |
|
749 | 749 | tip 2:3816541e5485 |
|
750 | 750 | visible 0:193e9254ce7e |
|
751 | 751 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
752 | 752 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
753 | 753 | $ hg tags |
|
754 | 754 | visible 0:193e9254ce7e |
|
755 | 755 | tip 0:193e9254ce7e |
|
756 | 756 | |
|
757 | 757 | #if serve |
|
758 | 758 | |
|
759 | 759 | Test issue 4506 |
|
760 | 760 | |
|
761 | 761 | $ cd .. |
|
762 | 762 | $ hg init repo-issue4506 |
|
763 | 763 | $ cd repo-issue4506 |
|
764 | 764 | $ echo "0" > foo |
|
765 | 765 | $ hg add foo |
|
766 | 766 | $ hg ci -m "content-0" |
|
767 | 767 | |
|
768 | 768 | $ hg up null |
|
769 | 769 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
770 | 770 | $ echo "1" > bar |
|
771 | 771 | $ hg add bar |
|
772 | 772 | $ hg ci -m "content-1" |
|
773 | 773 | created new head |
|
774 | 774 | $ hg up 0 |
|
775 | 775 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
776 | 776 | $ hg graft 1 |
|
777 | 777 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
778 | 778 | |
|
779 | 779 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
780 | 780 | |
|
781 | 781 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
782 | 782 | $ cat hg.pid >> $DAEMON_PIDS |
|
783 | 783 | |
|
784 | 784 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/1' |
|
785 | 785 | 404 Not Found |
|
786 | 786 | [1] |
|
787 | 787 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'file/tip/bar' |
|
788 | 788 | 200 Script output follows |
|
789 | 789 | $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
790 | 790 | 200 Script output follows |
|
791 | 791 | |
|
792 | 792 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
793 | 793 | |
|
794 | 794 | #endif |
|
795 | 795 | |
|
796 | 796 | $ hg init a |
|
797 | 797 | $ cd a |
|
798 | 798 | $ touch foo |
|
799 | 799 | $ hg add foo |
|
800 | 800 | $ hg ci -mfoo |
|
801 | 801 | $ touch bar |
|
802 | 802 | $ hg add bar |
|
803 | 803 | $ hg ci -mbar |
|
804 | 804 | $ hg up 0 |
|
805 | 805 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
806 | 806 | $ touch quux |
|
807 | 807 | $ hg add quux |
|
808 | 808 | $ hg ci -m quux |
|
809 | 809 | created new head |
|
810 | 810 | $ hg up 1 |
|
811 | 811 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
812 | 812 | $ hg tag 1.0 |
|
813 | 813 | |
|
814 | 814 | $ hg up 2 |
|
815 | 815 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
816 | 816 | $ hg log -G |
|
817 | 817 | o 3:bc47fc7e1c1d (draft) [tip ] Added tag 1.0 for changeset 50c889141114 |
|
818 | 818 | | |
|
819 | 819 | | @ 2:3d7f255a0081 (draft) [ ] quux |
|
820 | 820 | | | |
|
821 | 821 | o | 1:50c889141114 (draft) [1.0 ] bar |
|
822 | 822 | |/ |
|
823 | 823 | o 0:1f7b0de80e11 (draft) [ ] foo |
|
824 | 824 | |
|
825 | 825 | $ hg debugobsolete `getid bar` |
|
826 | 826 | $ hg debugobsolete `getid 1.0` |
|
827 | 827 | $ hg tag 1.0 |
|
828 | 828 | $ hg log -G |
|
829 | 829 | @ 4:f9f2ab71ffd5 (draft) [tip ] Added tag 1.0 for changeset 3d7f255a0081 |
|
830 | 830 | | |
|
831 | 831 | o 2:3d7f255a0081 (draft) [1.0 ] quux |
|
832 | 832 | | |
|
833 | 833 | o 0:1f7b0de80e11 (draft) [ ] foo |
|
834 | 834 | |
|
835 | 835 | $ cat .hgtags |
|
836 | 836 | 3d7f255a008103380aeb2a7d581fe257f40969e7 1.0 |
General Comments 0
You need to be logged in to leave comments.
Login now