Make it possible to archive repositories that are inaccessible.

Review Request #14415 — Created April 30, 2025 and submitted — Latest diff uploaded

Information

Review Board
release-7.1.x

Reviewers

The PUT /repositories/<n>/ API supports an archive_name field which
can hide the repository and give it a special name. This was going
through the regular repository form to actually handle the save
operation, which meant that if the repository being archived was
inaccessible for some reason, the operation would fail.

This change makes it so we check if the only thing being done is
archiving the repository, and if so we skip using the form and just
update the model itself.

Ran unit tests.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Make it possible to archive repositories that are inaccessible.
The PUT /repositories/<n>/ API supports an `archive_name` field which can hide the repository and give it a special name. This was going through the regular repository form to actually handle the save operation, which meant that if the repository being archived was inaccessible for some reason, the operation would fail. This change makes it so we check if the only thing being done is archiving the repository, and if so we skip using the form and just update the model itself. Testing Done: Ran unit tests.
85650c3a7cdbf419477948cc8f31dda141ae4348 David Trowbridge
reviewboard/webapi/resources/repository.py
reviewboard/webapi/tests/test_repository.py
Loading...