Skip to content

Show conflict warning when there are conflicts and showing the full diff

Thomas Randolph requested to merge tor/defect/diff-head-merge-conflicts into master

What does this MR do?

For #287919 (closed)

Copying the last commit description here:

isFullChangeset is the implied behavior we want:

Only show the merge conflict warning if the user is viewing the diff at the latest version (HEAD) and seeing a diff from the BASE version (e.g.: not a subset of the diff).

If they're viewing the full changeset and there are conflicts then we show the warning.

In essence, we've been trying to simulate a check for what we actually care about: Is the user seeing the full changeset starting from the base of the branch and ending at the latest commit (HEAD) of the branch?

This MR simply codifies that explicitly: isFullChangeset is true when there's no special start commit and the current commit is the latest. Critically, both of these values are delivered by the diffs_metadata API response, not from the URL.

Screenshots (strongly suggested)

I'm not including any screenshots because the visuals aren't changing.

Please see the issue linked above for the banner in question here.

The only change is when that banner appears, and it should consistently appear now where A) there are conflicts and B) those conflicts are on the current state of the MR that would be merged into it's target.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Phil Hughes

Merge request reports