Show More
@@ -229,6 +229,24 b' class rebaseruntime(object):' | |||
|
229 | 229 | self.external = external |
|
230 | 230 | self.activebookmark = activebookmark |
|
231 | 231 | |
|
232 | def _handleskippingobsolete(self, rebaserevs, obsoleterevs, target): | |
|
233 | """Compute structures necessary for skipping obsolete revisions | |
|
234 | ||
|
235 | rebaserevs: iterable of all revisions that are to be rebased | |
|
236 | obsoleterevs: iterable of all obsolete revisions in rebaseset | |
|
237 | target: a destination revision for the rebase operation | |
|
238 | """ | |
|
239 | self.obsoletenotrebased = {} | |
|
240 | if not self.ui.configbool('experimental', 'rebaseskipobsolete', | |
|
241 | default=True): | |
|
242 | return | |
|
243 | rebaseset = set(rebaserevs) | |
|
244 | obsoleteset = set(obsoleterevs) | |
|
245 | self.obsoletenotrebased = _computeobsoletenotrebased(self.repo, | |
|
246 | obsoleteset, target) | |
|
247 | skippedset = set(self.obsoletenotrebased) | |
|
248 | _checkobsrebase(self.repo, self.ui, obsoleteset, rebaseset, skippedset) | |
|
249 | ||
|
232 | 250 | def _prepareabortorcontinue(self, isabort): |
|
233 | 251 | try: |
|
234 | 252 | self.restorestatus() |
@@ -248,17 +266,8 b' class rebaseruntime(object):' | |||
|
248 | 266 | return abort(self.repo, self.originalwd, self.target, |
|
249 | 267 | self.state, activebookmark=self.activebookmark) |
|
250 | 268 | |
|
251 | self.obsoletenotrebased = {} | |
|
252 | if self.ui.configbool('experimental', 'rebaseskipobsolete', | |
|
253 | default=True): | |
|
254 | rebaseobsrevs = set([r for r, st in self.state.items() | |
|
255 | if st == revprecursor]) | |
|
256 | rebasesetrevs = set(self.state.keys()) | |
|
257 | self.obsoletenotrebased = _computeobsoletenotrebased(self.repo, | |
|
258 | rebaseobsrevs, self.target) | |
|
259 | rebaseobsskipped = set(self.obsoletenotrebased) | |
|
260 | _checkobsrebase(self.repo, self.ui, rebaseobsrevs, rebasesetrevs, | |
|
261 | rebaseobsskipped) | |
|
269 | obsrevs = (r for r, st in self.state.items() if st == revprecursor) | |
|
270 | self._handleskippingobsolete(self.state.keys(), obsrevs, self.target) | |
|
262 | 271 | |
|
263 | 272 | def _preparenewrebase(self, dest, rebaseset): |
|
264 | 273 | if dest is None: |
@@ -273,18 +282,8 b' class rebaseruntime(object):' | |||
|
273 | 282 | " unrebased descendants"), |
|
274 | 283 | hint=_('use --keep to keep original changesets')) |
|
275 | 284 | |
|
276 | self.obsoletenotrebased = {} | |
|
277 | if self.ui.configbool('experimental', 'rebaseskipobsolete', | |
|
278 | default=True): | |
|
279 | rebasesetrevs = set(rebaseset) | |
|
280 | rebaseobsrevs = _filterobsoleterevs(self.repo, rebasesetrevs) | |
|
281 | self.obsoletenotrebased = _computeobsoletenotrebased(self.repo, | |
|
282 | rebaseobsrevs, | |
|
283 | dest) | |
|
284 | rebaseobsskipped = set(self.obsoletenotrebased) | |
|
285 | _checkobsrebase(self.repo, self.ui, rebaseobsrevs, | |
|
286 | rebasesetrevs, | |
|
287 | rebaseobsskipped) | |
|
285 | obsrevs = _filterobsoleterevs(self.repo, rebaseset) | |
|
286 | self._handleskippingobsolete(rebaseset, obsrevs, dest) | |
|
288 | 287 | |
|
289 | 288 | result = buildstate(self.repo, dest, rebaseset, self.collapsef, |
|
290 | 289 | self.obsoletenotrebased) |
General Comments 0
You need to be logged in to leave comments.
Login now