Show More
@@ -361,11 +361,9 b' class rebaseruntime(object):' | |||||
361 | ( |
|
361 | ( | |
362 | self.obsoletenotrebased, |
|
362 | self.obsoletenotrebased, | |
363 | self.obsoletewithoutsuccessorindestination, |
|
363 | self.obsoletewithoutsuccessorindestination, | |
364 | obsoleteextinctsuccessors, |
|
|||
365 | ) = _computeobsoletenotrebased(self.repo, obsoleteset, destmap) |
|
364 | ) = _computeobsoletenotrebased(self.repo, obsoleteset, destmap) | |
366 | skippedset = set(self.obsoletenotrebased) |
|
365 | skippedset = set(self.obsoletenotrebased) | |
367 | skippedset.update(self.obsoletewithoutsuccessorindestination) |
|
366 | skippedset.update(self.obsoletewithoutsuccessorindestination) | |
368 | skippedset.update(obsoleteextinctsuccessors) |
|
|||
369 | _checkobsrebase(self.repo, self.ui, obsoleteset, skippedset) |
|
367 | _checkobsrebase(self.repo, self.ui, obsoleteset, skippedset) | |
370 |
|
368 | |||
371 | def _prepareabortorcontinue( |
|
369 | def _prepareabortorcontinue( | |
@@ -2192,13 +2190,9 b' def _computeobsoletenotrebased(repo, reb' | |||||
2192 |
|
2190 | |||
2193 | `obsoletewithoutsuccessorindestination` is a set with obsolete revisions |
|
2191 | `obsoletewithoutsuccessorindestination` is a set with obsolete revisions | |
2194 | without a successor in destination. |
|
2192 | without a successor in destination. | |
2195 |
|
||||
2196 | `obsoleteextinctsuccessors` is a set of obsolete revisions with only |
|
|||
2197 | obsolete successors. |
|
|||
2198 | """ |
|
2193 | """ | |
2199 | obsoletenotrebased = {} |
|
2194 | obsoletenotrebased = {} | |
2200 | obsoletewithoutsuccessorindestination = set() |
|
2195 | obsoletewithoutsuccessorindestination = set() | |
2201 | obsoleteextinctsuccessors = set() |
|
|||
2202 |
|
2196 | |||
2203 | assert repo.filtername is None |
|
2197 | assert repo.filtername is None | |
2204 | cl = repo.changelog |
|
2198 | cl = repo.changelog | |
@@ -2212,11 +2206,8 b' def _computeobsoletenotrebased(repo, reb' | |||||
2212 | successors.remove(srcnode) |
|
2206 | successors.remove(srcnode) | |
2213 | succrevs = {get_rev(s) for s in successors} |
|
2207 | succrevs = {get_rev(s) for s in successors} | |
2214 | succrevs.discard(None) |
|
2208 | succrevs.discard(None) | |
2215 | if succrevs.issubset(extinctrevs): |
|
2209 | if not successors or succrevs.issubset(extinctrevs): | |
2216 | # all successors are extinct |
|
2210 | # no successor, or all successors are extinct | |
2217 | obsoleteextinctsuccessors.add(srcrev) |
|
|||
2218 | if not successors: |
|
|||
2219 | # no successor |
|
|||
2220 | obsoletenotrebased[srcrev] = None |
|
2211 | obsoletenotrebased[srcrev] = None | |
2221 | else: |
|
2212 | else: | |
2222 | dstrev = destmap[srcrev] |
|
2213 | dstrev = destmap[srcrev] | |
@@ -2231,11 +2222,7 b' def _computeobsoletenotrebased(repo, reb' | |||||
2231 | if srcrev in extinctrevs or any(s in destmap for s in succrevs): |
|
2222 | if srcrev in extinctrevs or any(s in destmap for s in succrevs): | |
2232 | obsoletewithoutsuccessorindestination.add(srcrev) |
|
2223 | obsoletewithoutsuccessorindestination.add(srcrev) | |
2233 |
|
2224 | |||
2234 | return ( |
|
2225 | return obsoletenotrebased, obsoletewithoutsuccessorindestination | |
2235 | obsoletenotrebased, |
|
|||
2236 | obsoletewithoutsuccessorindestination, |
|
|||
2237 | obsoleteextinctsuccessors, |
|
|||
2238 | ) |
|
|||
2239 |
|
2226 | |||
2240 |
|
2227 | |||
2241 | def abortrebase(ui, repo): |
|
2228 | def abortrebase(ui, repo): |
@@ -1294,18 +1294,16 b' issue5782' | |||||
1294 | o 0:b173517d0057 a |
|
1294 | o 0:b173517d0057 a | |
1295 |
|
1295 | |||
1296 | $ hg rebase -d 0 -r 2 |
|
1296 | $ hg rebase -d 0 -r 2 | |
1297 | rebasing 2:a82ac2b38757 c "c" |
|
1297 | note: not rebasing 2:a82ac2b38757 c "c", it has no successor | |
1298 | $ hg log -G -r 'a': --hidden |
|
1298 | $ hg log -G -r 'a': --hidden | |
1299 | o 5:69ad416a4a26 c |
|
1299 | * 4:76be324c128b d | |
1300 | | |
|
1300 | | | |
1301 | | * 4:76be324c128b d |
|
1301 | | x 3:ef8a456de8fa c1 (pruned) | |
1302 | | | |
|
1302 | | | | |
1303 | | | x 3:ef8a456de8fa c1 (pruned) |
|
1303 | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) | |
1304 | | | | |
|
|||
1305 | | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) |
|
|||
1306 | | |/ |
|
|||
1307 | | o 1:488e1b7e7341 b |
|
|||
1308 | |/ |
|
1304 | |/ | |
|
1305 | o 1:488e1b7e7341 b | |||
|
1306 | | | |||
1309 | o 0:b173517d0057 a |
|
1307 | o 0:b173517d0057 a | |
1310 |
|
1308 | |||
1311 | $ cd .. |
|
1309 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now