Closed Bug 1750693 Opened 2 years ago Closed 2 years ago

Use pathlib in the "python/mozversioncontrol" module

Categories

(Firefox Build System :: Mach Core, task, P2)

task

Tracking

(firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: ahochheiden, Assigned: ahochheiden)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

Replace string paths with pathlib objects in the mozversioncontrol module.
Note: to ensure the scope of this bug doesn't explode, don't yet refactor any objects that are included in the context object provided to Mach commands - ensure that it keeps the same API for now.

Assignee: nobody → ahochheiden
Status: NEW → ASSIGNED

The py.path allowed adding arbitrary fields to it, while a pathlib.Path
does not. To replicate the behavior with as few changes as possible, I
made a test fixture wrapper class (RepoTestFixture) to add the same
arbitrary fields to, while now containing a Pathlib path instead.

Also added some utility functions to make the running of tests a
bit cleaner ('execute_next_step' and 'execute_multiple_steps')

Depends on D136301

Attachment #9259635 - Attachment description: Bug 1750693 - Update string path to Pathlib objects in Mozversioncontrol module r?#build → Bug 1750693 - Update string paths to Pathlib objects in Mozversioncontrol module r?#build
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/257e51d38bb2
Update tests in mozversioncontrol to be compatible with Windows r=firefox-build-system-reviewers,mhentges
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6bab903b927b
Removed `update_git_repo` function since it is unused r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/cde3b4e115e9
Update string paths to Pathlib objects in Mozversioncontrol module r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/a53cb68d7632
Minimum changes necessary in mozversioncontrol/test to facilitate Pathlib migration r=firefox-build-system-reviewers,mhentges
Regressions: 1753739
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: