##// END OF EJS Templates
rebase: minor refactoring of _computeobsoletenotrebased...
Laurent Charignon -
r27744:f2b8b4e2 default
parent child Browse files
Show More
@@ -343,8 +343,10 b' def rebase(ui, repo, **opts):'
343 343 obsoletenotrebased = {}
344 344 if ui.configbool('experimental', 'rebaseskipobsolete'):
345 345 rebasesetrevs = set(rebaseset)
346 rebaseobsrevs = set(r for r in rebasesetrevs
347 if repo[r].obsolete())
346 348 obsoletenotrebased = _computeobsoletenotrebased(repo,
347 rebasesetrevs,
349 rebaseobsrevs,
348 350 dest)
349 351
350 352 # - plain prune (no successor) changesets are rebased
@@ -1174,7 +1176,7 b' def _rebasedvisible(orig, repo):'
1174 1176 blockers.update(getattr(repo, '_rebaseset', ()))
1175 1177 return blockers
1176 1178
1177 def _computeobsoletenotrebased(repo, rebasesetrevs, dest):
1179 def _computeobsoletenotrebased(repo, rebaseobsrevs, dest):
1178 1180 """return a mapping obsolete => successor for all obsolete nodes to be
1179 1181 rebased that have a successors in the destination
1180 1182
@@ -1185,15 +1187,13 b' def _computeobsoletenotrebased(repo, reb'
1185 1187 # nodes to be rebased
1186 1188 allsuccessors = {}
1187 1189 cl = repo.changelog
1188 for r in rebasesetrevs:
1189 n = repo[r]
1190 if n.obsolete():
1191 node = cl.node(r)
1192 for s in obsolete.allsuccessors(repo.obsstore, [node]):
1193 try:
1194 allsuccessors[cl.rev(s)] = cl.rev(node)
1195 except LookupError:
1196 pass
1190 for r in rebaseobsrevs:
1191 node = cl.node(r)
1192 for s in obsolete.allsuccessors(repo.obsstore, [node]):
1193 try:
1194 allsuccessors[cl.rev(s)] = cl.rev(node)
1195 except LookupError:
1196 pass
1197 1197
1198 1198 if allsuccessors:
1199 1199 # Look for successors of obsolete nodes to be rebased among
General Comments 0
You need to be logged in to leave comments. Login now