Skip to content

Bug 2048352 - Split the push workflow into VCS agnostic base classes - #3529

Open
nahadji wants to merge 2 commits into
mozilla:masterfrom
nahadji:bug-2048352-vcs-base-classes
Open

Bug 2048352 - Split the push workflow into VCS agnostic base classes#3529
nahadji wants to merge 2 commits into
mozilla:masterfrom
nahadji:bug-2048352-vcs-base-classes

Conversation

@nahadji

@nahadji nahadji commented Jul 27, 2026

Copy link
Copy Markdown

Extract the version control agnostic parts of the mercurial push workflow into BaseRepository and BaseWorker (new vcs module): building and applying a stack of Phabricator patches, committing try_task_config.json, the skippable files detection, the push retry loop and the worker output handling.

The Mercurial specific parts stay in MercurialRepository (renamed from Repository to avoid confusion with the upcoming Git implementation) and MercurialWorker: robustcheckout and batch clones, revision lookups with the Lando git2hg fallback, patch application through hg import, ssh push and the treestatus wait.

No behavior change: this prepares the introduction of a Git implementation of the same workflow as subclasses of the new bases (First step of the review feedback on #3490).

Extract the version control agnostic parts of the mercurial push workflow
into BaseRepository and BaseWorker (new vcs module): building and applying a
stack of Phabricator patches, committing try_task_config.json, the skippable
files detection, the push retry loop and the worker output handling.

The Mercurial specific parts stay in MercurialRepository (renamed from
Repository to avoid confusion with the upcoming Git implementation) and
MercurialWorker: robustcheckout and batch clones, revision lookups with the
Lando git2hg fallback, patch application through hg import, ssh push and the
treestatus wait.

No behavior change: this prepares the introduction of a Git implementation
of the same workflow as subclasses of the new bases.
@nahadji
nahadji marked this pull request as ready for review July 28, 2026 12:43

@La0 La0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Worker handle_build method could output a dedicated class instance in the future, so it's easier to process across various implementations (don't do it there, it's already a great base to build upon).

Comment thread bot/code_review_bot/vcs.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants