##// END OF EJS Templates
rebase: use revnums (not nodes) for set of extinct revisions...
Martin von Zweigbergk -
r38695:20a30bb8 default
parent child Browse files
Show More
@@ -1855,14 +1855,15 b' def _computeobsoletenotrebased(repo, reb'
1855 assert repo.filtername is None
1855 assert repo.filtername is None
1856 cl = repo.changelog
1856 cl = repo.changelog
1857 nodemap = cl.nodemap
1857 nodemap = cl.nodemap
1858 extinctnodes = set(cl.node(r) for r in repo.revs('extinct()'))
1858 extinctrevs = set(repo.revs('extinct()'))
1859 for srcrev in rebaseobsrevs:
1859 for srcrev in rebaseobsrevs:
1860 srcnode = cl.node(srcrev)
1860 srcnode = cl.node(srcrev)
1861 # XXX: more advanced APIs are required to handle split correctly
1861 # XXX: more advanced APIs are required to handle split correctly
1862 successors = set(obsutil.allsuccessors(repo.obsstore, [srcnode]))
1862 successors = set(obsutil.allsuccessors(repo.obsstore, [srcnode]))
1863 # obsutil.allsuccessors includes node itself
1863 # obsutil.allsuccessors includes node itself
1864 successors.remove(srcnode)
1864 successors.remove(srcnode)
1865 if successors.issubset(extinctnodes):
1865 succrevs = {nodemap[s] for s in successors if s in nodemap}
1866 if succrevs.issubset(extinctrevs):
1866 # all successors are extinct
1867 # all successors are extinct
1867 obsoleteextinctsuccessors.add(srcrev)
1868 obsoleteextinctsuccessors.add(srcrev)
1868 if not successors:
1869 if not successors:
@@ -1870,7 +1871,6 b' def _computeobsoletenotrebased(repo, reb'
1870 obsoletenotrebased[srcrev] = None
1871 obsoletenotrebased[srcrev] = None
1871 else:
1872 else:
1872 dstrev = destmap[srcrev]
1873 dstrev = destmap[srcrev]
1873 succrevs = [nodemap[s] for s in successors if s in nodemap]
1874 for succrev in succrevs:
1874 for succrev in succrevs:
1875 if cl.isancestorrev(succrev, dstrev):
1875 if cl.isancestorrev(succrev, dstrev):
1876 obsoletenotrebased[srcrev] = succrev
1876 obsoletenotrebased[srcrev] = succrev
General Comments 0
You need to be logged in to leave comments. Login now