Closed Bug 1964708 Opened 7 months ago Closed 6 months ago

moz-phab fails to detect head for branches in a pure-git based set-up

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: shtrom)

References

Details

Attachments

(1 file, 1 obsolete file)

moz-phab version (from moz-phab version): MozPhab 1.9.0 (Python 3.9.21, Darwin)

I recently set up a fresh clone of the git based mozilla-firefox/firefox repository. I checked out the release branches with git switch beta etc, to make sure that I had them there. I then tried to do an uplift:

% moz-phab uplift --train firefox-beta --single 9e742a3febeb73ddcfbefe43172c5aec3cebfc2b 

Couldn't find a head for firefox-beta in version control, submitting without rebase.
Submitting 1 commit for review
(New) 9e742a3febeb Bug 1962757 - For SERP telemetry, allow fields within cookies to be in any part of the field.
Submit to https://phabricator.services.mozilla.com (YES/No/Always)? ^C

My beta branch tracks origin/beta:

beta                          806c3d739b3a [origin/beta] Bug 1962301 - [devtools] Escape windows special characters for strings  a=RyanVM

Even if I try renaming the branch, I still get the same issue. I also see no other way to set the base (beta doesn't work because it "is not an uplift repository").

Unless I've missed something, the only way to do this is via manually basing the patch on the branches.

Severity: -- → S2

In the Mercurial world, we had a dependency that the Phabricator repo short name mapped to the appropriate head in mozilla-unified when automatically rebasing patches in moz-phab uplift. In the new Git world, the repo short name is instead firefox-<branch>, and the current state of moz-phab doesn't account for this.

We should switch from using the name of the train passed as the --train argument on the CLI to instead use the repo's default branch in the repo API response from Phabricator.

Assignee: nobody → omehani
Status: NEW → ASSIGNED
Attachment #9487890 - Attachment is obsolete: true

Authored by https://github.com/shtrom
https://github.com/mozilla-conduit/review/commit/575eb5616a114f49d19cb8e59f2f34eeeb81338a
[main] Bug 1964708 - uplift: use Phabricator default branch as a rebase target for Git repos r=sheehan

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Regressions: 1974684
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: