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 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

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.
42f4d83b06e7daa5f23732083fd151730e900bd9 David Trowbridge
reviewboard/webapi/resources/repository.py
reviewboard/webapi/tests/test_repository.py
Loading...