Bug 15243 - Patchtest deletes all local changes when running
Summary: Patchtest deletes all local changes when running
Status: RESOLVED FIXED
Alias: None
Product: Patchwork/Patchtest
Classification: Yocto Project Subprojects
Component: Patchtest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High normal
Target Milestone: 4.3 M4
Assignee: Trevor Gamblin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-10-19 11:47 UTC by Ross Burton
Modified: 2023-10-19 15:04 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2023-10-19 11:47:32 UTC
If there are any local changes in the repository then patchtest will delete then when it test-applies the patches.

(the git reset --hard in repo.py)

If it insists on applying/reseting the current branch then it should _definitely_ refuse to run if there are local uncommitted changes.

Ideally, it could create a temporary worktree so it can run in a pristine branch.
Comment 1 Trevor Gamblin 2023-10-19 15:04:30 UTC
Patch in master to fix: https://git.yoctoproject.org/poky/commit/?id=4ba54e29ffa6e3dbfcb92752a759b805a2591a09

It logs an error to console and exits if there are local changes. The temporary worktree idea will be kept in mind for future patchtest refactors.