landing: apply patches at their base and rebase for a 3-way merge (Bug 2047605)#1253
Closed
cgsheeh wants to merge 16 commits into
Closed
landing: apply patches at their base and rebase for a 3-way merge (Bug 2047605)#1253cgsheeh wants to merge 16 commits into
cgsheeh wants to merge 16 commits into
Conversation
…g 2047605) Lando applied patches with a 2-way `git apply`, which fails when the surrounding context shifted even from an unrelated edit. Track the diff's base revision from Phabricator's `differential.diff.search` and, when that commit exists in the target repo, apply the stack onto it and rebase onto the target branch for a true 3-way merge. Fall back to applying at the tip when the base is unavailable, and skip rebasing entirely when `target_commit_hash` pins the target. Post-rebase commit hashes are recorded on each revision, and rebase conflicts are captured and surfaced through the existing merge-conflict error breakdown.
|
View this pull request in Lando to land it once approved. |
shtrom
requested changes
Jun 16, 2026
shtrom
left a comment
Member
There was a problem hiding this comment.
Looking good. Mainly some suggestions and discussion to clarify.
Magnolia-Liu
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, just some clarifying questions.
Replace the commit/revision count-mismatch warning with a hard failure before push: an empty stack would land nothing, and a misaligned commit_id would misdirect the uplift cherry-pick workflow.
…_conflicts Move the last_commit_for_path lookup into collect_conflicts (which already touches the repo mid-conflict), so breakdown_from_conflicts only transforms its input with no repo interaction.
lando-worker Bot
pushed a commit
that referenced
this pull request
Jun 18, 2026
…g 2047605) r=shtrom Lando applied patches with a 2-way `git apply`, which fails when the surrounding context shifted even from an unrelated edit. Track the diff's base revision from Phabricator's `differential.diff.search` and, when that commit exists in the target repo, apply the stack onto it and rebase onto the target branch for a true 3-way merge. Fall back to applying at the tip when the base is unavailable, and skip rebasing entirely when `target_commit_hash` pins the target. Post-rebase commit hashes are recorded on each revision, and rebase conflicts are captured and surfaced through the existing merge-conflict error breakdown. Pull request: #1253
|
Pull request closed by commit c75ed29 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lando applied patches with a 2-way
git apply, which fails when the surroundingcontext shifted even from an unrelated edit. Track the diff's base revision from
Phabricator's
differential.diff.searchand, when that commit exists in thetarget repo, apply the stack onto it and rebase onto the target branch for a true
3-way merge. Fall back to applying at the tip when the base is unavailable, and
skip rebasing entirely when
target_commit_hashpins the target.Post-rebase commit hashes are recorded on each revision, and rebase conflicts are
captured and surfaced through the existing merge-conflict error breakdown.