Make it possible to archive repositories that are inaccessible.

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

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.

Summary ID
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
Description From Last Updated

This is missing a return type.

chipx86chipx86
chipx86
  1. 
      
  2. reviewboard/webapi/resources/repository.py (Diff revision 1)
     
     
     
    Show all issues

    This is missing a return type.

  3. 
      
david
chipx86
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.1.x (4cb0351)