Show More
@@ -1798,13 +1798,14 b' def _computeobsoletenotrebased(repo, reb' | |||||
1798 | destnode = cl.node(destmap[srcrev]) |
|
1798 | destnode = cl.node(destmap[srcrev]) | |
1799 | # XXX: more advanced APIs are required to handle split correctly |
|
1799 | # XXX: more advanced APIs are required to handle split correctly | |
1800 | successors = list(obsutil.allsuccessors(repo.obsstore, [srcnode])) |
|
1800 | successors = list(obsutil.allsuccessors(repo.obsstore, [srcnode])) | |
1801 | if len(successors) == 1: |
|
1801 | # obsutil.allsuccessors includes node itself | |
1802 | # obsutil.allsuccessors includes node itself. When the list only |
|
1802 | successors.remove(srcnode) | |
1803 | # contains one element, it means there are no successors. |
|
1803 | if not successors: | |
|
1804 | # no successor | |||
1804 | obsoletenotrebased[srcrev] = None |
|
1805 | obsoletenotrebased[srcrev] = None | |
1805 | else: |
|
1806 | else: | |
1806 | for succnode in successors: |
|
1807 | for succnode in successors: | |
1807 |
if |
|
1808 | if succnode not in nodemap: | |
1808 | continue |
|
1809 | continue | |
1809 | if cl.isancestor(succnode, destnode): |
|
1810 | if cl.isancestor(succnode, destnode): | |
1810 | obsoletenotrebased[srcrev] = nodemap[succnode] |
|
1811 | obsoletenotrebased[srcrev] = nodemap[succnode] | |
@@ -1813,8 +1814,7 b' def _computeobsoletenotrebased(repo, reb' | |||||
1813 | # If 'srcrev' has a successor in rebase set but none in |
|
1814 | # If 'srcrev' has a successor in rebase set but none in | |
1814 | # destination (which would be catched above), we shall skip it |
|
1815 | # destination (which would be catched above), we shall skip it | |
1815 | # and its descendants to avoid divergence. |
|
1816 | # and its descendants to avoid divergence. | |
1816 | if any(nodemap[s] in destmap |
|
1817 | if any(nodemap[s] in destmap for s in successors): | |
1817 | for s in successors if s != srcnode): |
|
|||
1818 | obsoletewithoutsuccessorindestination.add(srcrev) |
|
1818 | obsoletewithoutsuccessorindestination.add(srcrev) | |
1819 |
|
1819 | |||
1820 | return obsoletenotrebased, obsoletewithoutsuccessorindestination |
|
1820 | return obsoletenotrebased, obsoletewithoutsuccessorindestination |
General Comments 0
You need to be logged in to leave comments.
Login now