Show More
@@ -1,1396 +1,1397 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}{if(obsolete, ' *{obsolete}*')}{if(troubles, ' {troubles}')}) [{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 | 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 | Test the --index option of debugobsolete command |
|
129 | 129 | $ hg debugobsolete --index |
|
130 | 130 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
131 | 131 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
132 | 132 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
133 | 133 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
134 | 134 | |
|
135 | 135 | Refuse pathological nullid successors |
|
136 | 136 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
137 | 137 | transaction abort! |
|
138 | 138 | rollback completed |
|
139 | 139 | abort: bad obsolescence marker detected: invalid successors nullid |
|
140 | 140 | [255] |
|
141 | 141 | |
|
142 | 142 | Check that graphlog detect that a changeset is obsolete: |
|
143 | 143 | |
|
144 | 144 | $ hg log -G |
|
145 | 145 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
146 | 146 | | |
|
147 | 147 | o 1:7c3bad9141dc (draft) [ ] add b |
|
148 | 148 | | |
|
149 | 149 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
150 | 150 | |
|
151 | 151 | |
|
152 | 152 | check that heads does not report them |
|
153 | 153 | |
|
154 | 154 | $ hg heads |
|
155 | 155 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
156 | 156 | $ hg heads --hidden |
|
157 | 157 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
158 | 158 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
159 | 159 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
160 | 160 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c |
|
161 | 161 | |
|
162 | 162 | |
|
163 | 163 | check that summary does not report them |
|
164 | 164 | |
|
165 | 165 | $ hg init ../sink |
|
166 | 166 | $ echo '[paths]' >> .hg/hgrc |
|
167 | 167 | $ echo 'default=../sink' >> .hg/hgrc |
|
168 | 168 | $ hg summary --remote |
|
169 | 169 | parent: 5:5601fb93a350 tip |
|
170 | 170 | add new_3_c |
|
171 | 171 | branch: default |
|
172 | 172 | commit: (clean) |
|
173 | 173 | update: (current) |
|
174 | 174 | phases: 3 draft |
|
175 | 175 | remote: 3 outgoing |
|
176 | 176 | |
|
177 | 177 | $ hg summary --remote --hidden |
|
178 | 178 | parent: 5:5601fb93a350 tip |
|
179 | 179 | add new_3_c |
|
180 | 180 | branch: default |
|
181 | 181 | commit: (clean) |
|
182 | 182 | update: 3 new changesets, 4 branch heads (merge) |
|
183 | 183 | phases: 6 draft |
|
184 | 184 | remote: 3 outgoing |
|
185 | 185 | |
|
186 | 186 | check that various commands work well with filtering |
|
187 | 187 | |
|
188 | 188 | $ hg tip |
|
189 | 189 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
190 | 190 | $ hg log -r 6 |
|
191 | 191 | abort: unknown revision '6'! |
|
192 | 192 | [255] |
|
193 | 193 | $ hg log -r 4 |
|
194 | 194 | abort: hidden revision '4'! |
|
195 | 195 | (use --hidden to access hidden revisions) |
|
196 | 196 | [255] |
|
197 | 197 | $ hg debugrevspec 'rev(6)' |
|
198 | 198 | $ hg debugrevspec 'rev(4)' |
|
199 | 199 | $ hg debugrevspec 'null' |
|
200 | 200 | -1 |
|
201 | 201 | |
|
202 | 202 | Check that public changeset are not accounted as obsolete: |
|
203 | 203 | |
|
204 | 204 | $ hg --hidden phase --public 2 |
|
205 | 205 | $ hg log -G |
|
206 | 206 | @ 5:5601fb93a350 (draft bumped) [tip ] add new_3_c |
|
207 | 207 | | |
|
208 | 208 | | o 2:245bde4270cd (public) [ ] add original_c |
|
209 | 209 | |/ |
|
210 | 210 | o 1:7c3bad9141dc (public) [ ] add b |
|
211 | 211 | | |
|
212 | 212 | o 0:1f0dee641bb7 (public) [ ] add a |
|
213 | 213 | |
|
214 | 214 | |
|
215 | 215 | And that bumped changeset are detected |
|
216 | 216 | -------------------------------------- |
|
217 | 217 | |
|
218 | 218 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
219 | 219 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
220 | 220 | the public changeset |
|
221 | 221 | |
|
222 | 222 | $ hg log --hidden -r 'bumped()' |
|
223 | 223 | 5:5601fb93a350 (draft bumped) [tip ] add new_3_c |
|
224 | 224 | |
|
225 | 225 | And that we can't push bumped changeset |
|
226 | 226 | |
|
227 | 227 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
228 | 228 | pushing to ../tmpa |
|
229 | 229 | searching for changes |
|
230 | 230 | warning: repository is unrelated |
|
231 | 231 | adding changesets |
|
232 | 232 | adding manifests |
|
233 | 233 | adding file changes |
|
234 | 234 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
235 | 235 | $ hg push ../tmpa |
|
236 | 236 | pushing to ../tmpa |
|
237 | 237 | searching for changes |
|
238 | 238 | abort: push includes bumped changeset: 5601fb93a350! |
|
239 | 239 | [255] |
|
240 | 240 | |
|
241 | 241 | Fixing "bumped" situation |
|
242 | 242 | We need to create a clone of 5 and add a special marker with a flag |
|
243 | 243 | |
|
244 | 244 | $ hg summary |
|
245 | 245 | parent: 5:5601fb93a350 tip (bumped) |
|
246 | 246 | add new_3_c |
|
247 | 247 | branch: default |
|
248 | 248 | commit: (clean) |
|
249 | 249 | update: 1 new changesets, 2 branch heads (merge) |
|
250 | 250 | phases: 1 draft |
|
251 | 251 | bumped: 1 changesets |
|
252 | 252 | $ hg up '5^' |
|
253 | 253 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
254 | 254 | $ hg revert -ar 5 |
|
255 | 255 | adding new_3_c |
|
256 | 256 | $ hg ci -m 'add n3w_3_c' |
|
257 | 257 | created new head |
|
258 | 258 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
259 | 259 | $ hg log -r 'bumped()' |
|
260 | 260 | $ hg log -G |
|
261 | 261 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
262 | 262 | | |
|
263 | 263 | | o 2:245bde4270cd (public) [ ] add original_c |
|
264 | 264 | |/ |
|
265 | 265 | o 1:7c3bad9141dc (public) [ ] add b |
|
266 | 266 | | |
|
267 | 267 | o 0:1f0dee641bb7 (public) [ ] add a |
|
268 | 268 | |
|
269 | 269 | |
|
270 | 270 | Basic exclusive testing |
|
271 | 271 | |
|
272 | 272 | $ hg log -G --hidden |
|
273 | 273 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
274 | 274 | | |
|
275 | 275 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
276 | 276 | |/ |
|
277 | 277 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
278 | 278 | |/ |
|
279 | 279 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
280 | 280 | |/ |
|
281 | 281 | | o 2:245bde4270cd (public) [ ] add original_c |
|
282 | 282 | |/ |
|
283 | 283 | o 1:7c3bad9141dc (public) [ ] add b |
|
284 | 284 | | |
|
285 | 285 | o 0:1f0dee641bb7 (public) [ ] add a |
|
286 | 286 | |
|
287 | 287 | $ hg debugobsolete --rev 6f9641995072 |
|
288 | 288 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
289 | 289 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
290 | 290 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
291 | 291 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
292 | 292 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
293 | 293 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
294 | 294 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
295 | 295 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
296 | 296 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
297 | 297 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
298 | 298 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
299 | 299 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
300 | 300 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
301 | 301 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
302 | 302 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
303 | 303 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
304 | 304 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
305 | 305 | |
|
306 | 306 | $ cd .. |
|
307 | 307 | |
|
308 | 308 | Revision 0 is hidden |
|
309 | 309 | -------------------- |
|
310 | 310 | |
|
311 | 311 | $ hg init rev0hidden |
|
312 | 312 | $ cd rev0hidden |
|
313 | 313 | |
|
314 | 314 | $ mkcommit kill0 |
|
315 | 315 | $ hg up -q null |
|
316 | 316 | $ hg debugobsolete `getid kill0` |
|
317 | 317 | $ mkcommit a |
|
318 | 318 | $ mkcommit b |
|
319 | 319 | |
|
320 | 320 | Should pick the first visible revision as "repo" node |
|
321 | 321 | |
|
322 | 322 | $ hg archive ../archive-null |
|
323 | 323 | $ cat ../archive-null/.hg_archival.txt |
|
324 | 324 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
325 | 325 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
326 | 326 | branch: default |
|
327 | 327 | latesttag: null |
|
328 | 328 | latesttagdistance: 2 |
|
329 | 329 | changessincelatesttag: 2 |
|
330 | 330 | |
|
331 | 331 | |
|
332 | 332 | $ cd .. |
|
333 | 333 | |
|
334 | 334 | Exchange Test |
|
335 | 335 | ============================ |
|
336 | 336 | |
|
337 | 337 | Destination repo does not have any data |
|
338 | 338 | --------------------------------------- |
|
339 | 339 | |
|
340 | 340 | Simple incoming test |
|
341 | 341 | |
|
342 | 342 | $ hg init tmpc |
|
343 | 343 | $ cd tmpc |
|
344 | 344 | $ hg incoming ../tmpb |
|
345 | 345 | comparing with ../tmpb |
|
346 | 346 | 0:1f0dee641bb7 (public) [ ] add a |
|
347 | 347 | 1:7c3bad9141dc (public) [ ] add b |
|
348 | 348 | 2:245bde4270cd (public) [ ] add original_c |
|
349 | 349 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
350 | 350 | |
|
351 | 351 | Try to pull markers |
|
352 | 352 | (extinct changeset are excluded but marker are pushed) |
|
353 | 353 | |
|
354 | 354 | $ hg pull ../tmpb |
|
355 | 355 | pulling from ../tmpb |
|
356 | 356 | requesting all changes |
|
357 | 357 | adding changesets |
|
358 | 358 | adding manifests |
|
359 | 359 | adding file changes |
|
360 | 360 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
361 | 361 | 5 new obsolescence markers |
|
362 | 362 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
363 | 363 | $ hg debugobsolete |
|
364 | 364 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
365 | 365 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
366 | 366 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
367 | 367 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
368 | 368 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
369 | 369 | |
|
370 | 370 | Rollback//Transaction support |
|
371 | 371 | |
|
372 | 372 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
373 | 373 | $ hg debugobsolete |
|
374 | 374 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
375 | 375 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
376 | 376 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
377 | 377 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
378 | 378 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
379 | 379 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
380 | 380 | $ hg rollback -n |
|
381 | 381 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
382 | 382 | $ hg rollback |
|
383 | 383 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
384 | 384 | $ hg debugobsolete |
|
385 | 385 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
386 | 386 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
387 | 387 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
388 | 388 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
389 | 389 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
390 | 390 | |
|
391 | 391 | $ cd .. |
|
392 | 392 | |
|
393 | 393 | Try to push markers |
|
394 | 394 | |
|
395 | 395 | $ hg init tmpd |
|
396 | 396 | $ hg -R tmpb push tmpd |
|
397 | 397 | pushing to tmpd |
|
398 | 398 | searching for changes |
|
399 | 399 | adding changesets |
|
400 | 400 | adding manifests |
|
401 | 401 | adding file changes |
|
402 | 402 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
403 | 403 | 5 new obsolescence markers |
|
404 | 404 | $ hg -R tmpd debugobsolete | sort |
|
405 | 405 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
406 | 406 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
407 | 407 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
408 | 408 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
409 | 409 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
410 | 410 | |
|
411 | 411 | Check obsolete keys are exchanged only if source has an obsolete store |
|
412 | 412 | |
|
413 | 413 | $ hg init empty |
|
414 | 414 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
415 | 415 | pushing to tmpd |
|
416 | 416 | listkeys phases |
|
417 | 417 | listkeys bookmarks |
|
418 | 418 | no changes found |
|
419 | 419 | listkeys phases |
|
420 | 420 | [1] |
|
421 | 421 | |
|
422 | 422 | clone support |
|
423 | 423 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
424 | 424 | |
|
425 | 425 | $ hg clone tmpb clone-dest |
|
426 | 426 | updating to branch default |
|
427 | 427 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
428 | 428 | $ hg -R clone-dest log -G --hidden |
|
429 | 429 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
430 | 430 | | |
|
431 | 431 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
432 | 432 | |/ |
|
433 | 433 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
434 | 434 | |/ |
|
435 | 435 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
436 | 436 | |/ |
|
437 | 437 | | o 2:245bde4270cd (public) [ ] add original_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 | $ hg -R clone-dest debugobsolete |
|
444 | 444 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
445 | 445 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
446 | 446 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
447 | 447 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
448 | 448 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
449 | 449 | |
|
450 | 450 | |
|
451 | 451 | Destination repo have existing data |
|
452 | 452 | --------------------------------------- |
|
453 | 453 | |
|
454 | 454 | On pull |
|
455 | 455 | |
|
456 | 456 | $ hg init tmpe |
|
457 | 457 | $ cd tmpe |
|
458 | 458 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
459 | 459 | $ hg pull ../tmpb |
|
460 | 460 | pulling from ../tmpb |
|
461 | 461 | requesting all changes |
|
462 | 462 | adding changesets |
|
463 | 463 | adding manifests |
|
464 | 464 | adding file changes |
|
465 | 465 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
466 | 466 | 5 new obsolescence markers |
|
467 | 467 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
468 | 468 | $ hg debugobsolete |
|
469 | 469 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
470 | 470 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
471 | 471 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
472 | 472 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
473 | 473 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
474 | 474 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
475 | 475 | |
|
476 | 476 | |
|
477 | 477 | On push |
|
478 | 478 | |
|
479 | 479 | $ hg push ../tmpc |
|
480 | 480 | pushing to ../tmpc |
|
481 | 481 | searching for changes |
|
482 | 482 | no changes found |
|
483 | 483 | 1 new obsolescence markers |
|
484 | 484 | [1] |
|
485 | 485 | $ hg -R ../tmpc debugobsolete |
|
486 | 486 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
487 | 487 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
488 | 488 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
489 | 489 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
490 | 490 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
491 | 491 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
492 | 492 | |
|
493 | 493 | detect outgoing obsolete and unstable |
|
494 | 494 | --------------------------------------- |
|
495 | 495 | |
|
496 | 496 | |
|
497 | 497 | $ hg log -G |
|
498 | 498 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
499 | 499 | | |
|
500 | 500 | | o 2:245bde4270cd (public) [ ] add original_c |
|
501 | 501 | |/ |
|
502 | 502 | o 1:7c3bad9141dc (public) [ ] add b |
|
503 | 503 | | |
|
504 | 504 | o 0:1f0dee641bb7 (public) [ ] add a |
|
505 | 505 | |
|
506 | 506 | $ hg up 'desc("n3w_3_c")' |
|
507 | 507 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
508 | 508 | $ mkcommit original_d |
|
509 | 509 | $ mkcommit original_e |
|
510 | 510 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
511 | 511 | $ hg debugobsolete | grep `getid original_d` |
|
512 | 512 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
513 | 513 | $ hg log -r 'obsolete()' |
|
514 | 514 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
515 | 515 | $ hg summary |
|
516 | 516 | parent: 5:cda648ca50f5 tip (unstable) |
|
517 | 517 | add original_e |
|
518 | 518 | branch: default |
|
519 | 519 | commit: (clean) |
|
520 | 520 | update: 1 new changesets, 2 branch heads (merge) |
|
521 | 521 | phases: 3 draft |
|
522 | 522 | unstable: 1 changesets |
|
523 | 523 | $ hg log -G -r '::unstable()' |
|
524 | 524 | @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e |
|
525 | 525 | | |
|
526 | 526 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
527 | 527 | | |
|
528 | 528 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
529 | 529 | | |
|
530 | 530 | o 1:7c3bad9141dc (public) [ ] add b |
|
531 | 531 | | |
|
532 | 532 | o 0:1f0dee641bb7 (public) [ ] add a |
|
533 | 533 | |
|
534 | 534 | |
|
535 | 535 | refuse to push obsolete changeset |
|
536 | 536 | |
|
537 | 537 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
538 | 538 | pushing to ../tmpc/ |
|
539 | 539 | searching for changes |
|
540 | 540 | abort: push includes obsolete changeset: 94b33453f93b! |
|
541 | 541 | [255] |
|
542 | 542 | |
|
543 | 543 | refuse to push unstable changeset |
|
544 | 544 | |
|
545 | 545 | $ hg push ../tmpc/ |
|
546 | 546 | pushing to ../tmpc/ |
|
547 | 547 | searching for changes |
|
548 | 548 | abort: push includes unstable changeset: cda648ca50f5! |
|
549 | 549 | [255] |
|
550 | 550 | |
|
551 | 551 | Test that extinct changeset are properly detected |
|
552 | 552 | |
|
553 | 553 | $ hg log -r 'extinct()' |
|
554 | 554 | |
|
555 | 555 | Don't try to push extinct changeset |
|
556 | 556 | |
|
557 | 557 | $ hg init ../tmpf |
|
558 | 558 | $ hg out ../tmpf |
|
559 | 559 | comparing with ../tmpf |
|
560 | 560 | searching for changes |
|
561 | 561 | 0:1f0dee641bb7 (public) [ ] add a |
|
562 | 562 | 1:7c3bad9141dc (public) [ ] add b |
|
563 | 563 | 2:245bde4270cd (public) [ ] add original_c |
|
564 | 564 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
565 | 565 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
566 | 566 | 5:cda648ca50f5 (draft unstable) [tip ] add original_e |
|
567 | 567 | $ hg push ../tmpf -f # -f because be push unstable too |
|
568 | 568 | pushing to ../tmpf |
|
569 | 569 | searching for changes |
|
570 | 570 | adding changesets |
|
571 | 571 | adding manifests |
|
572 | 572 | adding file changes |
|
573 | 573 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
574 | 574 | 7 new obsolescence markers |
|
575 | 575 | |
|
576 | 576 | no warning displayed |
|
577 | 577 | |
|
578 | 578 | $ hg push ../tmpf |
|
579 | 579 | pushing to ../tmpf |
|
580 | 580 | searching for changes |
|
581 | 581 | no changes found |
|
582 | 582 | [1] |
|
583 | 583 | |
|
584 | 584 | Do not warn about new head when the new head is a successors of a remote one |
|
585 | 585 | |
|
586 | 586 | $ hg log -G |
|
587 | 587 | @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e |
|
588 | 588 | | |
|
589 | 589 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
590 | 590 | | |
|
591 | 591 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
592 | 592 | | |
|
593 | 593 | | o 2:245bde4270cd (public) [ ] add original_c |
|
594 | 594 | |/ |
|
595 | 595 | o 1:7c3bad9141dc (public) [ ] add b |
|
596 | 596 | | |
|
597 | 597 | o 0:1f0dee641bb7 (public) [ ] add a |
|
598 | 598 | |
|
599 | 599 | $ hg up -q 'desc(n3w_3_c)' |
|
600 | 600 | $ mkcommit obsolete_e |
|
601 | 601 | created new head |
|
602 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` | |
|
602 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ | |
|
603 | > -u 'test <test@example.net>' | |
|
603 | 604 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
604 | 605 | comparing with ../tmpf |
|
605 | 606 | searching for changes |
|
606 | 607 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
607 | 608 | $ hg push ../tmpf |
|
608 | 609 | pushing to ../tmpf |
|
609 | 610 | searching for changes |
|
610 | 611 | adding changesets |
|
611 | 612 | adding manifests |
|
612 | 613 | adding file changes |
|
613 | 614 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
614 | 615 | 1 new obsolescence markers |
|
615 | 616 | |
|
616 | 617 | test relevance computation |
|
617 | 618 | --------------------------------------- |
|
618 | 619 | |
|
619 | 620 | Checking simple case of "marker relevance". |
|
620 | 621 | |
|
621 | 622 | |
|
622 | 623 | Reminder of the repo situation |
|
623 | 624 | |
|
624 | 625 | $ hg log --hidden --graph |
|
625 | 626 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
626 | 627 | | |
|
627 | 628 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e |
|
628 | 629 | | | |
|
629 | 630 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
630 | 631 | |/ |
|
631 | 632 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
632 | 633 | | |
|
633 | 634 | | o 2:245bde4270cd (public) [ ] add original_c |
|
634 | 635 | |/ |
|
635 | 636 | o 1:7c3bad9141dc (public) [ ] add b |
|
636 | 637 | | |
|
637 | 638 | o 0:1f0dee641bb7 (public) [ ] add a |
|
638 | 639 | |
|
639 | 640 | |
|
640 | 641 | List of all markers |
|
641 | 642 | |
|
642 | 643 | $ hg debugobsolete |
|
643 | 644 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
644 | 645 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
645 | 646 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
646 | 647 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
647 | 648 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
648 | 649 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
649 | 650 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
650 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) | |
|
651 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
|
651 | 652 | |
|
652 | 653 | List of changesets with no chain |
|
653 | 654 | |
|
654 | 655 | $ hg debugobsolete --hidden --rev ::2 |
|
655 | 656 | |
|
656 | 657 | List of changesets that are included on marker chain |
|
657 | 658 | |
|
658 | 659 | $ hg debugobsolete --hidden --rev 6 |
|
659 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) | |
|
660 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
|
660 | 661 | |
|
661 | 662 | List of changesets with a longer chain, (including a pruned children) |
|
662 | 663 | |
|
663 | 664 | $ hg debugobsolete --hidden --rev 3 |
|
664 | 665 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
665 | 666 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
666 | 667 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
667 | 668 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
668 | 669 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
669 | 670 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
670 | 671 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
671 | 672 | |
|
672 | 673 | List of both |
|
673 | 674 | |
|
674 | 675 | $ hg debugobsolete --hidden --rev 3::6 |
|
675 | 676 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
676 | 677 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
677 | 678 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
678 | 679 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
679 | 680 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
680 | 681 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
681 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) | |
|
682 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
|
682 | 683 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
683 | 684 | |
|
684 | 685 | List of all markers in JSON |
|
685 | 686 | |
|
686 | 687 | $ hg debugobsolete -Tjson |
|
687 | 688 | [ |
|
688 | 689 | { |
|
689 | 690 | "date": [1339.0, 0], |
|
690 | 691 | "flag": 0, |
|
691 | 692 | "metadata": {"user": "test"}, |
|
692 | 693 | "precnode": "1339133913391339133913391339133913391339", |
|
693 | 694 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
694 | 695 | }, |
|
695 | 696 | { |
|
696 | 697 | "date": [1339.0, 0], |
|
697 | 698 | "flag": 0, |
|
698 | 699 | "metadata": {"user": "test"}, |
|
699 | 700 | "precnode": "1337133713371337133713371337133713371337", |
|
700 | 701 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
701 | 702 | }, |
|
702 | 703 | { |
|
703 | 704 | "date": [121.0, 120], |
|
704 | 705 | "flag": 12, |
|
705 | 706 | "metadata": {"user": "test"}, |
|
706 | 707 | "precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
707 | 708 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
708 | 709 | }, |
|
709 | 710 | { |
|
710 | 711 | "date": [1338.0, 0], |
|
711 | 712 | "flag": 1, |
|
712 | 713 | "metadata": {"user": "test"}, |
|
713 | 714 | "precnode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
714 | 715 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
715 | 716 | }, |
|
716 | 717 | { |
|
717 | 718 | "date": [1338.0, 0], |
|
718 | 719 | "flag": 0, |
|
719 | 720 | "metadata": {"user": "test"}, |
|
720 | 721 | "precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
721 | 722 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
722 | 723 | }, |
|
723 | 724 | { |
|
724 | 725 | "date": [1337.0, 0], |
|
725 | 726 | "flag": 0, |
|
726 | 727 | "metadata": {"user": "test"}, |
|
727 | 728 | "precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
728 | 729 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
729 | 730 | }, |
|
730 | 731 | { |
|
731 | 732 | "date": [0.0, 0], |
|
732 | 733 | "flag": 0, |
|
733 | 734 | "metadata": {"user": "test"}, |
|
734 | 735 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
735 | 736 | "precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
736 | 737 | "succnodes": [] |
|
737 | 738 | }, |
|
738 | 739 | { |
|
739 | 740 | "date": *, (glob) |
|
740 | 741 | "flag": 0, |
|
741 | "metadata": {"user": "test"}, | |
|
742 | "metadata": {"user": "test \u003ctest@example.net\u003e"}, | |
|
742 | 743 | "precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
743 | 744 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
744 | 745 | } |
|
745 | 746 | ] |
|
746 | 747 | |
|
747 | 748 | Template keywords |
|
748 | 749 | |
|
749 | 750 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
750 | 751 | 3de5eca88c00 ????-??-?? (glob) |
|
751 | 752 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
752 | user=test | |
|
753 | user=test <test@example.net> | |
|
753 | 754 | $ hg debugobsolete -r6 -T '{metadata}\n' |
|
754 | 'user': 'test' | |
|
755 | 'user': 'test <test@example.net>' | |
|
755 | 756 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
756 | 0 test | |
|
757 | 0 test <test@example.net> | |
|
757 | 758 | |
|
758 | 759 | Test the debug output for exchange |
|
759 | 760 | ---------------------------------- |
|
760 | 761 | |
|
761 | 762 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
762 | 763 | pulling from ../tmpb |
|
763 | 764 | searching for changes |
|
764 | 765 | no changes found |
|
765 | 766 | obsmarker-exchange: 346 bytes received |
|
766 | 767 | |
|
767 | 768 | check hgweb does not explode |
|
768 | 769 | ==================================== |
|
769 | 770 | |
|
770 | 771 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
771 | 772 | adding changesets |
|
772 | 773 | adding manifests |
|
773 | 774 | adding file changes |
|
774 | 775 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
775 | 776 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
776 | 777 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
777 | 778 | > do |
|
778 | 779 | > hg debugobsolete $node |
|
779 | 780 | > done |
|
780 | 781 | $ hg up tip |
|
781 | 782 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
782 | 783 | |
|
783 | 784 | #if serve |
|
784 | 785 | |
|
785 | 786 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
786 | 787 | $ cat hg.pid >> $DAEMON_PIDS |
|
787 | 788 | |
|
788 | 789 | check changelog view |
|
789 | 790 | |
|
790 | 791 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
791 | 792 | 200 Script output follows |
|
792 | 793 | |
|
793 | 794 | check graph view |
|
794 | 795 | |
|
795 | 796 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
796 | 797 | 200 Script output follows |
|
797 | 798 | |
|
798 | 799 | check filelog view |
|
799 | 800 | |
|
800 | 801 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
801 | 802 | 200 Script output follows |
|
802 | 803 | |
|
803 | 804 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
804 | 805 | 200 Script output follows |
|
805 | 806 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
806 | 807 | 404 Not Found |
|
807 | 808 | [1] |
|
808 | 809 | |
|
809 | 810 | check that web.view config option: |
|
810 | 811 | |
|
811 | 812 | $ killdaemons.py hg.pid |
|
812 | 813 | $ cat >> .hg/hgrc << EOF |
|
813 | 814 | > [web] |
|
814 | 815 | > view=all |
|
815 | 816 | > EOF |
|
816 | 817 | $ wait |
|
817 | 818 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
818 | 819 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
819 | 820 | 200 Script output follows |
|
820 | 821 | $ killdaemons.py hg.pid |
|
821 | 822 | |
|
822 | 823 | Checking _enable=False warning if obsolete marker exists |
|
823 | 824 | |
|
824 | 825 | $ echo '[experimental]' >> $HGRCPATH |
|
825 | 826 | $ echo "evolution=" >> $HGRCPATH |
|
826 | 827 | $ hg log -r tip |
|
827 | 828 | obsolete feature not enabled but 68 markers found! |
|
828 | 829 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
829 | 830 | |
|
830 | 831 | reenable for later test |
|
831 | 832 | |
|
832 | 833 | $ echo '[experimental]' >> $HGRCPATH |
|
833 | 834 | $ echo "evolution=createmarkers,exchange" >> $HGRCPATH |
|
834 | 835 | |
|
835 | 836 | $ rm hg.pid access.log errors.log |
|
836 | 837 | #endif |
|
837 | 838 | |
|
838 | 839 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
839 | 840 | |
|
840 | 841 | $ hg debugobsolete `getid obsolete_e` |
|
841 | 842 | $ hg debugobsolete `getid original_c` `getid babar` |
|
842 | 843 | $ hg log --config ui.logtemplate= -r 'bumped() and unstable()' |
|
843 | 844 | changeset: 7:50c51b361e60 |
|
844 | 845 | user: test |
|
845 | 846 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
846 | 847 | trouble: unstable, bumped |
|
847 | 848 | summary: add babar |
|
848 | 849 | |
|
849 | 850 | |
|
850 | 851 | test the "obsolete" templatekw |
|
851 | 852 | |
|
852 | 853 | $ hg log -r 'obsolete()' |
|
853 | 854 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e |
|
854 | 855 | |
|
855 | 856 | test the "troubles" templatekw |
|
856 | 857 | |
|
857 | 858 | $ hg log -r 'bumped() and unstable()' |
|
858 | 859 | 7:50c51b361e60 (draft unstable bumped) [ ] add babar |
|
859 | 860 | |
|
860 | 861 | test the default cmdline template |
|
861 | 862 | |
|
862 | 863 | $ hg log -T default -r 'bumped()' |
|
863 | 864 | changeset: 7:50c51b361e60 |
|
864 | 865 | user: test |
|
865 | 866 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
866 | 867 | trouble: unstable, bumped |
|
867 | 868 | summary: add babar |
|
868 | 869 | |
|
869 | 870 | $ hg log -T default -r 'obsolete()' |
|
870 | 871 | changeset: 6:3de5eca88c00 |
|
871 | 872 | parent: 3:6f9641995072 |
|
872 | 873 | user: test |
|
873 | 874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
874 | 875 | summary: add obsolete_e |
|
875 | 876 | |
|
876 | 877 | |
|
877 | 878 | test summary output |
|
878 | 879 | |
|
879 | 880 | $ hg up -r 'bumped() and unstable()' |
|
880 | 881 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
881 | 882 | $ hg summary |
|
882 | 883 | parent: 7:50c51b361e60 (unstable, bumped) |
|
883 | 884 | add babar |
|
884 | 885 | branch: default |
|
885 | 886 | commit: (clean) |
|
886 | 887 | update: 2 new changesets (update) |
|
887 | 888 | phases: 4 draft |
|
888 | 889 | unstable: 2 changesets |
|
889 | 890 | bumped: 1 changesets |
|
890 | 891 | $ hg up -r 'obsolete()' |
|
891 | 892 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
892 | 893 | $ hg summary |
|
893 | 894 | parent: 6:3de5eca88c00 (obsolete) |
|
894 | 895 | add obsolete_e |
|
895 | 896 | branch: default |
|
896 | 897 | commit: (clean) |
|
897 | 898 | update: 3 new changesets (update) |
|
898 | 899 | phases: 4 draft |
|
899 | 900 | unstable: 2 changesets |
|
900 | 901 | bumped: 1 changesets |
|
901 | 902 | |
|
902 | 903 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
903 | 904 | =============================================================================== |
|
904 | 905 | |
|
905 | 906 | This test issue 3805 |
|
906 | 907 | |
|
907 | 908 | $ hg init repo-issue3805 |
|
908 | 909 | $ cd repo-issue3805 |
|
909 | 910 | $ echo "base" > base |
|
910 | 911 | $ hg ci -Am "base" |
|
911 | 912 | adding base |
|
912 | 913 | $ echo "foo" > foo |
|
913 | 914 | $ hg ci -Am "A" |
|
914 | 915 | adding foo |
|
915 | 916 | $ hg clone . ../other-issue3805 |
|
916 | 917 | updating to branch default |
|
917 | 918 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
918 | 919 | $ echo "bar" >> foo |
|
919 | 920 | $ hg ci --amend |
|
920 | 921 | $ cd ../other-issue3805 |
|
921 | 922 | $ hg log -G |
|
922 | 923 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
923 | 924 | | |
|
924 | 925 | o 0:d20a80d4def3 (draft) [ ] base |
|
925 | 926 | |
|
926 | 927 | $ hg log -G -R ../repo-issue3805 |
|
927 | 928 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
928 | 929 | | |
|
929 | 930 | o 0:d20a80d4def3 (draft) [ ] base |
|
930 | 931 | |
|
931 | 932 | $ hg incoming |
|
932 | 933 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
933 | 934 | searching for changes |
|
934 | 935 | 3:323a9c3ddd91 (draft) [tip ] A |
|
935 | 936 | $ hg incoming --bundle ../issue3805.hg |
|
936 | 937 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
937 | 938 | searching for changes |
|
938 | 939 | 3:323a9c3ddd91 (draft) [tip ] A |
|
939 | 940 | $ hg outgoing |
|
940 | 941 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
941 | 942 | searching for changes |
|
942 | 943 | 1:29f0c6921ddd (draft) [tip ] A |
|
943 | 944 | |
|
944 | 945 | #if serve |
|
945 | 946 | |
|
946 | 947 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
947 | 948 | $ cat hg.pid >> $DAEMON_PIDS |
|
948 | 949 | |
|
949 | 950 | $ hg incoming http://localhost:$HGPORT |
|
950 | 951 | comparing with http://localhost:$HGPORT/ |
|
951 | 952 | searching for changes |
|
952 | 953 | 2:323a9c3ddd91 (draft) [tip ] A |
|
953 | 954 | $ hg outgoing http://localhost:$HGPORT |
|
954 | 955 | comparing with http://localhost:$HGPORT/ |
|
955 | 956 | searching for changes |
|
956 | 957 | 1:29f0c6921ddd (draft) [tip ] A |
|
957 | 958 | |
|
958 | 959 | $ killdaemons.py |
|
959 | 960 | |
|
960 | 961 | #endif |
|
961 | 962 | |
|
962 | 963 | This test issue 3814 |
|
963 | 964 | |
|
964 | 965 | (nothing to push but locally hidden changeset) |
|
965 | 966 | |
|
966 | 967 | $ cd .. |
|
967 | 968 | $ hg init repo-issue3814 |
|
968 | 969 | $ cd repo-issue3805 |
|
969 | 970 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
970 | 971 | pushing to ../repo-issue3814 |
|
971 | 972 | searching for changes |
|
972 | 973 | adding changesets |
|
973 | 974 | adding manifests |
|
974 | 975 | adding file changes |
|
975 | 976 | added 2 changesets with 2 changes to 2 files |
|
976 | 977 | 2 new obsolescence markers |
|
977 | 978 | $ hg out ../repo-issue3814 |
|
978 | 979 | comparing with ../repo-issue3814 |
|
979 | 980 | searching for changes |
|
980 | 981 | no changes found |
|
981 | 982 | [1] |
|
982 | 983 | |
|
983 | 984 | Test that a local tag blocks a changeset from being hidden |
|
984 | 985 | |
|
985 | 986 | $ hg tag -l visible -r 1 --hidden |
|
986 | 987 | $ hg log -G |
|
987 | 988 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
988 | 989 | | |
|
989 | 990 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A |
|
990 | 991 | |/ |
|
991 | 992 | o 0:d20a80d4def3 (draft) [ ] base |
|
992 | 993 | |
|
993 | 994 | Test that removing a local tag does not cause some commands to fail |
|
994 | 995 | |
|
995 | 996 | $ hg tag -l -r tip tiptag |
|
996 | 997 | $ hg tags |
|
997 | 998 | tiptag 3:323a9c3ddd91 |
|
998 | 999 | tip 3:323a9c3ddd91 |
|
999 | 1000 | visible 1:29f0c6921ddd |
|
1000 | 1001 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1001 | 1002 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1002 | 1003 | $ hg tags |
|
1003 | 1004 | visible 1:29f0c6921ddd |
|
1004 | 1005 | tip 1:29f0c6921ddd |
|
1005 | 1006 | |
|
1006 | 1007 | Test bundle overlay onto hidden revision |
|
1007 | 1008 | |
|
1008 | 1009 | $ cd .. |
|
1009 | 1010 | $ hg init repo-bundleoverlay |
|
1010 | 1011 | $ cd repo-bundleoverlay |
|
1011 | 1012 | $ echo "A" > foo |
|
1012 | 1013 | $ hg ci -Am "A" |
|
1013 | 1014 | adding foo |
|
1014 | 1015 | $ echo "B" >> foo |
|
1015 | 1016 | $ hg ci -m "B" |
|
1016 | 1017 | $ hg up 0 |
|
1017 | 1018 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1018 | 1019 | $ echo "C" >> foo |
|
1019 | 1020 | $ hg ci -m "C" |
|
1020 | 1021 | created new head |
|
1021 | 1022 | $ hg log -G |
|
1022 | 1023 | @ 2:c186d7714947 (draft) [tip ] C |
|
1023 | 1024 | | |
|
1024 | 1025 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1025 | 1026 | |/ |
|
1026 | 1027 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1027 | 1028 | |
|
1028 | 1029 | |
|
1029 | 1030 | $ hg clone -r1 . ../other-bundleoverlay |
|
1030 | 1031 | adding changesets |
|
1031 | 1032 | adding manifests |
|
1032 | 1033 | adding file changes |
|
1033 | 1034 | added 2 changesets with 2 changes to 1 files |
|
1034 | 1035 | updating to branch default |
|
1035 | 1036 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1036 | 1037 | $ cd ../other-bundleoverlay |
|
1037 | 1038 | $ echo "B+" >> foo |
|
1038 | 1039 | $ hg ci --amend -m "B+" |
|
1039 | 1040 | $ hg log -G --hidden |
|
1040 | 1041 | @ 3:b7d587542d40 (draft) [tip ] B+ |
|
1041 | 1042 | | |
|
1042 | 1043 | | x 2:eb95e9297e18 (draft *obsolete*) [ ] temporary amend commit for 44526ebb0f98 |
|
1043 | 1044 | | | |
|
1044 | 1045 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B |
|
1045 | 1046 | |/ |
|
1046 | 1047 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1047 | 1048 | |
|
1048 | 1049 | |
|
1049 | 1050 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1050 | 1051 | comparing with ../repo-bundleoverlay |
|
1051 | 1052 | searching for changes |
|
1052 | 1053 | 1:44526ebb0f98 (draft) [ ] B |
|
1053 | 1054 | 2:c186d7714947 (draft) [tip ] C |
|
1054 | 1055 | $ hg log -G -R ../bundleoverlay.hg |
|
1055 | 1056 | o 4:c186d7714947 (draft) [tip ] C |
|
1056 | 1057 | | |
|
1057 | 1058 | | @ 3:b7d587542d40 (draft) [ ] B+ |
|
1058 | 1059 | |/ |
|
1059 | 1060 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1060 | 1061 | |
|
1061 | 1062 | |
|
1062 | 1063 | #if serve |
|
1063 | 1064 | |
|
1064 | 1065 | Test issue 4506 |
|
1065 | 1066 | |
|
1066 | 1067 | $ cd .. |
|
1067 | 1068 | $ hg init repo-issue4506 |
|
1068 | 1069 | $ cd repo-issue4506 |
|
1069 | 1070 | $ echo "0" > foo |
|
1070 | 1071 | $ hg add foo |
|
1071 | 1072 | $ hg ci -m "content-0" |
|
1072 | 1073 | |
|
1073 | 1074 | $ hg up null |
|
1074 | 1075 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1075 | 1076 | $ echo "1" > bar |
|
1076 | 1077 | $ hg add bar |
|
1077 | 1078 | $ hg ci -m "content-1" |
|
1078 | 1079 | created new head |
|
1079 | 1080 | $ hg up 0 |
|
1080 | 1081 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1081 | 1082 | $ hg graft 1 |
|
1082 | 1083 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1083 | 1084 | |
|
1084 | 1085 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1085 | 1086 | |
|
1086 | 1087 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1087 | 1088 | $ cat hg.pid >> $DAEMON_PIDS |
|
1088 | 1089 | |
|
1089 | 1090 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1090 | 1091 | 404 Not Found |
|
1091 | 1092 | [1] |
|
1092 | 1093 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1093 | 1094 | 200 Script output follows |
|
1094 | 1095 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1095 | 1096 | 200 Script output follows |
|
1096 | 1097 | |
|
1097 | 1098 | $ killdaemons.py |
|
1098 | 1099 | |
|
1099 | 1100 | #endif |
|
1100 | 1101 | |
|
1101 | 1102 | Test heads computation on pending index changes with obsolescence markers |
|
1102 | 1103 | $ cd .. |
|
1103 | 1104 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1104 | 1105 | > from mercurial import cmdutil, registrar |
|
1105 | 1106 | > from mercurial.i18n import _ |
|
1106 | 1107 | > |
|
1107 | 1108 | > cmdtable = {} |
|
1108 | 1109 | > command = registrar.command(cmdtable) |
|
1109 | 1110 | > @command("amendtransient",[], _('hg amendtransient [rev]')) |
|
1110 | 1111 | > def amend(ui, repo, *pats, **opts): |
|
1111 | 1112 | > def commitfunc(ui, repo, message, match, opts): |
|
1112 | 1113 | > return repo.commit(message, repo['.'].user(), repo['.'].date(), match) |
|
1113 | 1114 | > opts['message'] = 'Test' |
|
1114 | 1115 | > opts['logfile'] = None |
|
1115 | 1116 | > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts) |
|
1116 | 1117 | > ui.write('%s\n' % repo.changelog.headrevs()) |
|
1117 | 1118 | > EOF |
|
1118 | 1119 | $ cat >> $HGRCPATH << EOF |
|
1119 | 1120 | > [extensions] |
|
1120 | 1121 | > testextension=$TESTTMP/test_extension.py |
|
1121 | 1122 | > EOF |
|
1122 | 1123 | $ hg init repo-issue-nativerevs-pending-changes |
|
1123 | 1124 | $ cd repo-issue-nativerevs-pending-changes |
|
1124 | 1125 | $ mkcommit a |
|
1125 | 1126 | $ mkcommit b |
|
1126 | 1127 | $ hg up ".^" |
|
1127 | 1128 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1128 | 1129 | $ echo aa > a |
|
1129 | 1130 | $ hg amendtransient |
|
1130 | 1131 | [1, 3] |
|
1131 | 1132 | |
|
1132 | 1133 | Test cache consistency for the visible filter |
|
1133 | 1134 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1134 | 1135 | bookmarks change |
|
1135 | 1136 | $ cd .. |
|
1136 | 1137 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1137 | 1138 | > import weakref |
|
1138 | 1139 | > from mercurial import cmdutil, extensions, bookmarks, repoview |
|
1139 | 1140 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1140 | 1141 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1141 | 1142 | > def trhook(tr): |
|
1142 | 1143 | > repo = reporef() |
|
1143 | 1144 | > hidden1 = repoview.computehidden(repo) |
|
1144 | 1145 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1145 | 1146 | > if sorted(hidden1) != sorted(hidden): |
|
1146 | 1147 | > print "cache inconsistency" |
|
1147 | 1148 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1148 | 1149 | > orig(bkmstoreinst, *args, **kwargs) |
|
1149 | 1150 | > def extsetup(ui): |
|
1150 | 1151 | > extensions.wrapfunction(bookmarks.bmstore, 'recordchange', |
|
1151 | 1152 | > _bookmarkchanged) |
|
1152 | 1153 | > EOF |
|
1153 | 1154 | |
|
1154 | 1155 | $ hg init repo-cache-inconsistency |
|
1155 | 1156 | $ cd repo-issue-nativerevs-pending-changes |
|
1156 | 1157 | $ mkcommit a |
|
1157 | 1158 | a already tracked! |
|
1158 | 1159 | $ mkcommit b |
|
1159 | 1160 | $ hg id |
|
1160 | 1161 | 13bedc178fce tip |
|
1161 | 1162 | $ echo "hello" > b |
|
1162 | 1163 | $ hg commit --amend -m "message" |
|
1163 | 1164 | $ hg book bookb -r 13bedc178fce --hidden |
|
1164 | 1165 | $ hg log -r 13bedc178fce |
|
1165 | 1166 | 5:13bedc178fce (draft *obsolete*) [ bookb] add b |
|
1166 | 1167 | $ hg book -d bookb |
|
1167 | 1168 | $ hg log -r 13bedc178fce |
|
1168 | 1169 | abort: hidden revision '13bedc178fce'! |
|
1169 | 1170 | (use --hidden to access hidden revisions) |
|
1170 | 1171 | [255] |
|
1171 | 1172 | |
|
1172 | 1173 | Empty out the test extension, as it isn't compatible with later parts |
|
1173 | 1174 | of the test. |
|
1174 | 1175 | $ echo > $TESTTMP/test_extension.py |
|
1175 | 1176 | |
|
1176 | 1177 | Test ability to pull changeset with locally applying obsolescence markers |
|
1177 | 1178 | (issue4945) |
|
1178 | 1179 | |
|
1179 | 1180 | $ cd .. |
|
1180 | 1181 | $ hg init issue4845 |
|
1181 | 1182 | $ cd issue4845 |
|
1182 | 1183 | |
|
1183 | 1184 | $ echo foo > f0 |
|
1184 | 1185 | $ hg add f0 |
|
1185 | 1186 | $ hg ci -m '0' |
|
1186 | 1187 | $ echo foo > f1 |
|
1187 | 1188 | $ hg add f1 |
|
1188 | 1189 | $ hg ci -m '1' |
|
1189 | 1190 | $ echo foo > f2 |
|
1190 | 1191 | $ hg add f2 |
|
1191 | 1192 | $ hg ci -m '2' |
|
1192 | 1193 | |
|
1193 | 1194 | $ echo bar > f2 |
|
1194 | 1195 | $ hg commit --amend --config experimetnal.evolution=createmarkers |
|
1195 | 1196 | $ hg log -G |
|
1196 | 1197 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1197 | 1198 | | |
|
1198 | 1199 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1199 | 1200 | | |
|
1200 | 1201 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1201 | 1202 | |
|
1202 | 1203 | $ hg log -G --hidden |
|
1203 | 1204 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1204 | 1205 | | |
|
1205 | 1206 | | x 3:f27abbcc1f77 (draft *obsolete*) [ ] temporary amend commit for e008cf283490 |
|
1206 | 1207 | | | |
|
1207 | 1208 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 |
|
1208 | 1209 | |/ |
|
1209 | 1210 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1210 | 1211 | | |
|
1211 | 1212 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1212 | 1213 | |
|
1213 | 1214 | |
|
1214 | 1215 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1215 | 1216 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-39c978dc-backup.hg (glob) |
|
1216 | 1217 | $ hg debugobsolete |
|
1217 | 1218 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1218 | 1219 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1219 | 1220 | $ hg log -G |
|
1220 | 1221 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1221 | 1222 | | |
|
1222 | 1223 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1223 | 1224 | | |
|
1224 | 1225 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1225 | 1226 | |
|
1226 | 1227 | $ hg log -G --hidden |
|
1227 | 1228 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1228 | 1229 | | |
|
1229 | 1230 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1230 | 1231 | | |
|
1231 | 1232 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1232 | 1233 | |
|
1233 | 1234 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1234 | 1235 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1235 | 1236 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1236 | 1237 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1237 | 1238 | f27abbcc1f77fb409cf9160482fe619541e2d605 |
|
1238 | 1239 | obsmarkers -- 'sortdict()' |
|
1239 | 1240 | version: 1 (70 bytes) |
|
1240 | 1241 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1241 | 1242 | |
|
1242 | 1243 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1243 | 1244 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg |
|
1244 | 1245 | searching for changes |
|
1245 | 1246 | no changes found |
|
1246 | 1247 | $ hg debugobsolete |
|
1247 | 1248 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1248 | 1249 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1249 | 1250 | $ hg log -G |
|
1250 | 1251 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1251 | 1252 | | |
|
1252 | 1253 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1253 | 1254 | | |
|
1254 | 1255 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1255 | 1256 | |
|
1256 | 1257 | $ hg log -G --hidden |
|
1257 | 1258 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1258 | 1259 | | |
|
1259 | 1260 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1260 | 1261 | | |
|
1261 | 1262 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1262 | 1263 | |
|
1263 | 1264 | |
|
1264 | 1265 | Testing that strip remove markers: |
|
1265 | 1266 | |
|
1266 | 1267 | $ hg strip -r 1 --config extensions.strip= |
|
1267 | 1268 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1268 | 1269 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob) |
|
1269 | 1270 | $ hg debugobsolete |
|
1270 | 1271 | $ hg log -G |
|
1271 | 1272 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1272 | 1273 | |
|
1273 | 1274 | $ hg log -G --hidden |
|
1274 | 1275 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1275 | 1276 | |
|
1276 | 1277 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1277 | 1278 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1278 | 1279 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1279 | 1280 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1280 | 1281 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1281 | 1282 | obsmarkers -- 'sortdict()' |
|
1282 | 1283 | version: 1 (139 bytes) |
|
1283 | 1284 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1284 | 1285 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1285 | 1286 | |
|
1286 | 1287 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1287 | 1288 | adding changesets |
|
1288 | 1289 | adding manifests |
|
1289 | 1290 | adding file changes |
|
1290 | 1291 | added 2 changesets with 2 changes to 2 files |
|
1291 | 1292 | 2 new obsolescence markers |
|
1292 | 1293 | (run 'hg update' to get a working copy) |
|
1293 | 1294 | $ hg debugobsolete | sort |
|
1294 | 1295 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1295 | 1296 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1296 | 1297 | $ hg log -G |
|
1297 | 1298 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1298 | 1299 | | |
|
1299 | 1300 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1300 | 1301 | | |
|
1301 | 1302 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1302 | 1303 | |
|
1303 | 1304 | $ hg log -G --hidden |
|
1304 | 1305 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1305 | 1306 | | |
|
1306 | 1307 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1307 | 1308 | | |
|
1308 | 1309 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1309 | 1310 | |
|
1310 | 1311 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1311 | 1312 | only a subset of those are displayed (because of --rev option) |
|
1312 | 1313 | $ hg init doindexrev |
|
1313 | 1314 | $ cd doindexrev |
|
1314 | 1315 | $ echo a > a |
|
1315 | 1316 | $ hg ci -Am a |
|
1316 | 1317 | adding a |
|
1317 | 1318 | $ hg ci --amend -m aa |
|
1318 | 1319 | $ echo b > b |
|
1319 | 1320 | $ hg ci -Am b |
|
1320 | 1321 | adding b |
|
1321 | 1322 | $ hg ci --amend -m bb |
|
1322 | 1323 | $ echo c > c |
|
1323 | 1324 | $ hg ci -Am c |
|
1324 | 1325 | adding c |
|
1325 | 1326 | $ hg ci --amend -m cc |
|
1326 | 1327 | $ echo d > d |
|
1327 | 1328 | $ hg ci -Am d |
|
1328 | 1329 | adding d |
|
1329 | 1330 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 |
|
1330 | 1331 | $ hg debugobsolete --index --rev "3+7" |
|
1331 | 1332 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) |
|
1332 | 1333 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) |
|
1333 | 1334 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1334 | 1335 | [ |
|
1335 | 1336 | { |
|
1336 | 1337 | "date": [0.0, 0], |
|
1337 | 1338 | "flag": 0, |
|
1338 | 1339 | "index": 1, |
|
1339 | 1340 | "metadata": {"user": "test"}, |
|
1340 | 1341 | "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1341 | 1342 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1342 | 1343 | }, |
|
1343 | 1344 | { |
|
1344 | 1345 | "date": [0.0, 0], |
|
1345 | 1346 | "flag": 0, |
|
1346 | 1347 | "index": 3, |
|
1347 | 1348 | "metadata": {"operation": "amend", "user": "test"}, |
|
1348 | 1349 | "precnode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1349 | 1350 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1350 | 1351 | } |
|
1351 | 1352 | ] |
|
1352 | 1353 | |
|
1353 | 1354 | Test the --delete option of debugobsolete command |
|
1354 | 1355 | $ hg debugobsolete --index |
|
1355 | 1356 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1356 | 1357 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1357 | 1358 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1358 | 1359 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1359 | 1360 | $ hg debugobsolete --delete 1 --delete 3 |
|
1360 | 1361 | deleted 2 obsolescence markers |
|
1361 | 1362 | $ hg debugobsolete |
|
1362 | 1363 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1363 | 1364 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1364 | 1365 | |
|
1365 | 1366 | Test adding changeset after obsmarkers affecting it |
|
1366 | 1367 | (eg: during pull, or unbundle) |
|
1367 | 1368 | |
|
1368 | 1369 | $ mkcommit e |
|
1369 | 1370 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1370 | 1371 | 1 changesets found |
|
1371 | 1372 | $ getid . |
|
1372 | 1373 | $ hg --config extensions.strip= strip -r . |
|
1373 | 1374 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1374 | 1375 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob) |
|
1375 | 1376 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1376 | 1377 | $ hg unbundle ../bundle-2.hg |
|
1377 | 1378 | adding changesets |
|
1378 | 1379 | adding manifests |
|
1379 | 1380 | adding file changes |
|
1380 | 1381 | added 1 changesets with 1 changes to 1 files |
|
1381 | 1382 | (run 'hg update' to get a working copy) |
|
1382 | 1383 | $ hg log -G |
|
1383 | 1384 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1384 | 1385 | | |
|
1385 | 1386 | | o 6:4715cf767440 (draft) [ ] d |
|
1386 | 1387 | |/ |
|
1387 | 1388 | o 5:29346082e4a9 (draft) [ ] cc |
|
1388 | 1389 | | |
|
1389 | 1390 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1390 | 1391 | | |
|
1391 | 1392 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1392 | 1393 | |/ |
|
1393 | 1394 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1394 | 1395 | |
|
1395 | 1396 | |
|
1396 | 1397 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now