`--push-to-lando` on a Git repo with a non-Mozilla remote will not find the correct base revision
Categories
(Developer Infrastructure :: Try, defect)
Tracking
(firefox122 fixed)
| Tracking | Status | |
|---|---|---|
| firefox122 | --- | fixed |
People
(Reporter: sheehan, Assigned: sheehan)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
When using --push-to-lando on Git, mach try will try and find the base commit using git rev-list HEAD --topo-order --boundary --not --remotes, essentially returning the first descendant commit from HEAD that is found on a remote branch. This means if a user has a non-Mozilla Git remote branch in their repo (for example a fork on Github or some other machine they push to) Git will find that remote branch and consider it to be the base revision to apply the patch to. Lando will then fail with a "revision not found" error while trying to apply the patch.
The --remotes flag accepts an optional pattern argument which can be used to limit the remotes that are considered when finding the base revision. We should add some simple parsing of git remote to find which remote is the actual Firefox repo and only consider that remote when determining the base commit.
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Add a get_mozilla_upstream_remote method for GitRepository that
scans the output of git remote -v for an official Mozilla URL. Use
this URL in base_ref to limit the remotes considered for remote
branches, defaulting to --remotes without an argument if one can't
be found.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•