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