Homec4science

Fix an issue with incorrect split head detection in Mercurial after pushing a…

Authored by epriestley <git@epriestley.com> on Mar 25 2016, 13:05.

Description

Fix an issue with incorrect split head detection in Mercurial after pushing a medley of varied changes

Summary:
Fixes T10665. See that task for discussion.

Because $head_map is not properly re-initialized for each ref we check, pushes which affect multiple branches (say, "A" and "B") can have information bleed from the first branch check to the second branch.

To trigger a problem behavior, you can push one commit which updates an existing branch, plus one commit which creates a new branch. If they process in the right order, the $head_map from the updated branch will bleed into the $head_map for the new branch and trigger an incorrect head split detection.

Test Plan:

  • Pushed a set of changes which updated branch-a and created branch-b.
    • Before change: improper detection of split heads.
    • After change: clean push.
  • Pushed a set of changes which split the head of branch-d.
    • Correct detection of split heads.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10665

Differential Revision: https://secure.phabricator.com/D15522

Details

Committed
epriestley <git@epriestley.com>Mar 25 2016, 15:33
Pushed
aubortJan 31 2017, 17:16
Parents
rPH3493d9d5138e: Fix a typo
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH4dc857e36d54: Fix an issue with incorrect split head detection in Mercurial after pushing a… (authored by epriestley <git@epriestley.com>).Mar 25 2016, 15:33