This is an archive of the discontinued Mercurial Phabricator instance.

cleanupnodes: preserve phase of parents of new nodes
ClosedPublic

Authored by martinvonz on Jun 21 2018, 11:56 AM.

Details

Summary

As Yuya noted in the review of D3818, passing in
targetphase=phases.draft would result in advancing the phase boundary
of a secret-phase parent. We never pass targetphase=phases.draft so
far, but it's a bug waiting to happen.

I tried to refactor it so max(parentphase, X) happened in one place,
but I couldn't come up with good variables names and I ended up with a
"newphase = max(newphase, parentphase)" line, which made the whole
block not look any better to me.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Jun 21 2018, 11:56 AM
This revision was automatically updated to reflect the committed changes.