This is an archive of the discontinued Mercurial Phabricator instance.

backout: don't assume that tip as what we just committed
ClosedPublic

Authored by danchr on Oct 28 2020, 9:06 PM.

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

danchr created this revision.Oct 28 2020, 9:06 PM

Does this fix a defect? The test makes it seem like it does?

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
danchr updated this revision to Diff 23352.Oct 29 2020, 3:03 AM

Does this fix a defect? The test makes it seem like it does?

Strictly speaking, yes it does, but like the other changeset, the nature of that bug is rather esoteric, and I discovered it by reading the code: If you back out a commit already backed out, and set the time (and so on) such that the resulting commit already existed, and is not tip, the output will be wrong. With an unchanging date, you cannot assume that the result of commit is always tip.