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