Show More
@@ -49,7 +49,11 b' def _bundle(repo, bases, heads, node, su' | |||||
49 | bundletype = "HG10UN" |
|
49 | bundletype = "HG10UN" | |
50 |
|
50 | |||
51 | outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) |
|
51 | outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) | |
52 | contentopts = {'cg.version': cgversion, 'obsolescence': obsolescence} |
|
52 | contentopts = { | |
|
53 | 'cg.version': cgversion, | |||
|
54 | 'obsolescence': obsolescence, | |||
|
55 | 'phases': True, | |||
|
56 | } | |||
53 | return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, |
|
57 | return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, | |
54 | outgoing, contentopts, vfs, compression=comp) |
|
58 | outgoing, contentopts, vfs, compression=comp) | |
55 |
|
59 | |||
@@ -194,6 +198,7 b' def strip(ui, repo, nodelist, backup=Tru' | |||||
194 | deleteobsmarkers(repo.obsstore, stripobsidx) |
|
198 | deleteobsmarkers(repo.obsstore, stripobsidx) | |
195 | del repo.obsstore |
|
199 | del repo.obsstore | |
196 |
|
200 | |||
|
201 | repo._phasecache.filterunknown(repo) | |||
197 | if tmpbundlefile: |
|
202 | if tmpbundlefile: | |
198 | ui.note(_("adding branch\n")) |
|
203 | ui.note(_("adding branch\n")) | |
199 | f = vfs.open(tmpbundlefile, "rb") |
|
204 | f = vfs.open(tmpbundlefile, "rb") |
@@ -170,6 +170,32 b' to see that secret becomes draft, but pu' | |||||
170 | | |
|
170 | | | |
171 | o A public |
|
171 | o A public | |
172 |
|
172 | |||
|
173 | Unbundling change in the middle of a stack does not affect later changes | |||
|
174 | $ hg strip --no-backup E | |||
|
175 | $ hg phase --secret --force D | |||
|
176 | $ hg log -G -T '{desc} {phase}\n' | |||
|
177 | o D secret | |||
|
178 | | | |||
|
179 | o C draft | |||
|
180 | | | |||
|
181 | o B draft | |||
|
182 | | | |||
|
183 | o A public | |||
|
184 | ||||
|
185 | $ hg bundle --base A -r B bundle | |||
|
186 | 1 changesets found | |||
|
187 | $ hg unbundle -q bundle | |||
|
188 | $ rm bundle | |||
|
189 | $ hg log -G -T '{desc} {phase}\n' | |||
|
190 | o D secret | |||
|
191 | | | |||
|
192 | o C draft | |||
|
193 | | | |||
|
194 | o B draft | |||
|
195 | | | |||
|
196 | o A public | |||
|
197 | ||||
|
198 | ||||
173 | $ cd .. |
|
199 | $ cd .. | |
174 |
|
200 | |||
175 | Set up repo with non-linear history |
|
201 | Set up repo with non-linear history |
@@ -157,5 +157,7 b' Test that strip bundle use bundle2' | |||||
157 | Stream params: sortdict([('Compression', 'BZ')]) |
|
157 | Stream params: sortdict([('Compression', 'BZ')]) | |
158 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" |
|
158 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" | |
159 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 |
|
159 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 | |
|
160 | phase-heads -- 'sortdict()' | |||
|
161 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 draft | |||
160 |
|
162 | |||
161 | $ cd .. |
|
163 | $ cd .. |
@@ -1239,6 +1239,8 b' Test ability to pull changeset with loca' | |||||
1239 | obsmarkers -- 'sortdict()' |
|
1239 | obsmarkers -- 'sortdict()' | |
1240 | version: 1 (70 bytes) |
|
1240 | version: 1 (70 bytes) | |
1241 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1241 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1242 | phase-heads -- 'sortdict()' | |||
|
1243 | f27abbcc1f77fb409cf9160482fe619541e2d605 draft | |||
1242 |
|
1244 | |||
1243 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1245 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg | |
1244 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg |
|
1246 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg | |
@@ -1283,6 +1285,8 b' Testing that strip remove markers:' | |||||
1283 | version: 1 (139 bytes) |
|
1285 | version: 1 (139 bytes) | |
1284 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1286 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1285 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1287 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1288 | phase-heads -- 'sortdict()' | |||
|
1289 | b0551702f918510f01ae838ab03a463054c67b46 draft | |||
1286 |
|
1290 | |||
1287 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1291 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1288 | adding changesets |
|
1292 | adding changesets |
@@ -281,16 +281,18 b' Check that the right ancestors is used w' | |||||
281 | list of changesets: |
|
281 | list of changesets: | |
282 | e31216eec445e44352c5f01588856059466a24c9 |
|
282 | e31216eec445e44352c5f01588856059466a24c9 | |
283 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 |
|
283 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 | |
284 |
bundle2-output-bundle: "HG20", (1 params) |
|
284 | bundle2-output-bundle: "HG20", (1 params) 2 parts total | |
285 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
285 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
|
286 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
286 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) |
|
287 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) | |
287 | 3 changesets found |
|
288 | 3 changesets found | |
288 | list of changesets: |
|
289 | list of changesets: | |
289 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
|
290 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c | |
290 | 19c888675e133ab5dff84516926a65672eaf04d9 |
|
291 | 19c888675e133ab5dff84516926a65672eaf04d9 | |
291 | 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf |
|
292 | 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf | |
292 |
bundle2-output-bundle: "HG20", |
|
293 | bundle2-output-bundle: "HG20", 2 parts total | |
293 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
294 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
|
295 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
294 | adding branch |
|
296 | adding branch | |
295 | bundle2-input-bundle: with-transaction |
|
297 | bundle2-input-bundle: with-transaction | |
296 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
|
298 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported | |
@@ -303,7 +305,9 b' Check that the right ancestors is used w' | |||||
303 | adding f1.txt revisions |
|
305 | adding f1.txt revisions | |
304 | added 2 changesets with 2 changes to 1 files |
|
306 | added 2 changesets with 2 changes to 1 files | |
305 | bundle2-input-part: total payload size 1686 |
|
307 | bundle2-input-part: total payload size 1686 | |
306 | bundle2-input-bundle: 0 parts total |
|
308 | bundle2-input-part: "phase-heads" supported | |
|
309 | bundle2-input-part: total payload size 24 | |||
|
310 | bundle2-input-bundle: 1 parts total | |||
307 | updating the branch cache |
|
311 | updating the branch cache | |
308 | invalid branchheads cache (served): tip differs |
|
312 | invalid branchheads cache (served): tip differs | |
309 | rebase completed |
|
313 | rebase completed |
@@ -213,6 +213,8 b'' | |||||
213 | Stream params: sortdict([('Compression', 'BZ')]) |
|
213 | Stream params: sortdict([('Compression', 'BZ')]) | |
214 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" |
|
214 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" | |
215 | 264128213d290d868c54642d13aeaa3675551a78 |
|
215 | 264128213d290d868c54642d13aeaa3675551a78 | |
|
216 | phase-heads -- 'sortdict()' | |||
|
217 | 264128213d290d868c54642d13aeaa3675551a78 draft | |||
216 | $ hg pull .hg/strip-backup/* |
|
218 | $ hg pull .hg/strip-backup/* | |
217 | pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg |
|
219 | pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg | |
218 | searching for changes |
|
220 | searching for changes | |
@@ -839,8 +841,9 b' check strip behavior' | |||||
839 | list of changesets: |
|
841 | list of changesets: | |
840 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c |
|
842 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c | |
841 | d8db9d1372214336d2b5570f20ee468d2c72fa8b |
|
843 | d8db9d1372214336d2b5570f20ee468d2c72fa8b | |
842 |
bundle2-output-bundle: "HG20", (1 params) |
|
844 | bundle2-output-bundle: "HG20", (1 params) 2 parts total | |
843 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
845 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
|
846 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
844 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob) |
|
847 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob) | |
845 | updating the branch cache |
|
848 | updating the branch cache | |
846 | invalid branchheads cache (served): tip differs |
|
849 | invalid branchheads cache (served): tip differs |
General Comments 0
You need to be logged in to leave comments.
Login now