This is an archive of the discontinued Mercurial Phabricator instance.

fix: add extra field to fixed revisions to avoid creating obsolescence cycles
ClosedPublic

Authored by hooper on Nov 8 2018, 4:32 PM.

Details

Summary

The extra field prevents sequential invocations of fix from producing the same
hash twice. Previously, this could cause problems because it would create an
obsolescence cycle instead of the expected new successor.

This change also adds an explicit check for whether a new revision should be
committed. Until now, the code relied on memctx.commit() to quietly do nothing
if the node already exists. Because of the new extra field, this no longer
covers the case where we don't want to replace an unchanged node.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

hooper created this revision.Nov 8 2018, 4:32 PM
This revision was automatically updated to reflect the committed changes.