Comments
Patch
@@ -245,8 +245,15 @@
raise util.Abort(_('cannot change null revision phase'))
currentroots = currentroots.copy()
currentroots.update(newroots)
- ctxs = repo.set('roots(%ln::)', currentroots)
- currentroots.intersection_update(ctx.node() for ctx in ctxs)
+
+ # filter to the roots of the roots
+ # (could use a revset here, but it's slow on large repos)
+ cl = repo.changelog
+ currentrootrevs = [cl.rev(n) for n in currentroots]
+ desc = set(cl.descendants(currentrootrevs))
+ currentroots = set([cl.node(r) for r in currentrootrevs
+ if not r in desc])
+
self._updateroots(targetphase, currentroots)
repo.invalidatevolatilesets()