Closed Bug 1737838 Opened 3 years ago Closed 2 years ago

Add a `moz-phab uplift` command

Categories

(Conduit :: moz-phab, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

References

(Blocks 1 open bug)

Details

(Keywords: conduit-triaged)

Attachments

(4 files)

Request a local revision be posted to Phabricator as an uplift.

We should have the MPL at the top of all files that can
support the license.

Depends on D131981

Add a moz-phab uplift command to send commits to Phabricator
to be reviewed as uplift requests. The interface is similar to
moz-phab submit, in that a revset/commit range is specified
for submission, but the user must also pass a --train argument
with a Phabricator callsign indicating the target uplift train
to submit to. The target repos are any repository on Phabricator
with an uplift project tag associated with the repository. If the
repository has an appropriate named tag/bookmark/branch associated
with the passed train, a new set of revisions will be created via
rebase and the new commits will be submitted for uplift. When amending
the commits, the Differential Revision of the original revision
is moved to Original Revision and the uplift revision is set as
the Differential Revision.

To keep uplifting behaviour consistent with regular submissions the
uplift command re-uses almost all of the logic of submit, with
a few amendments that check the value of args.command to determine
if the uplift specific code paths should be taken. The submit
CLI argument parser is turned into a function so it can be re-used
by the submit parser.

A conduit function call is added to return repositories with an
associated tag, in our case the uplift tag. We add a few VCS specific
functions to associate a callsign with a named branch/symbol and to
perform the automatic uplifting functionality.

TODOS
- no telemetry
- if rebase fails we continue and submit anyways, probably wrong
- needs unit tests

Depends on D131983

Type: defect → enhancement
Keywords: conduit-triaged
Priority: -- → P2
See Also: → 1562621

This has landed in the repo, and we'll track getting it out to users in bug 1754057.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: