branch | stable |
changeset 51516 | e0f92bd98c24 |
parent 51505 | c9ceb4f60256 |
child 51517 | 4ee50d98d35c |
--- a/mercurial/phases.py Thu Mar 21 12:24:42 2024 +0100 +++ b/mercurial/phases.py Mon Mar 25 01:50:31 2024 +0100 @@ -907,9 +907,10 @@ replaced_roots.add(r) sets = self._phasesets sets[targetphase].update(changed_revs) - for r, old in changed_revs.items(): - if old > public: - sets[old].discard(r) + if targetphase > draft: + for r, old in changed_revs.items(): + if old > public: + sets[old].discard(r) if new_roots: assert changed_revs