Add a way to "archive" repository names before deleting them.

Review Request #2622 — Created Sept. 25, 2011 and submitted

Information

Review Board
release-1.6.x

Reviewers

Add a way to "archive" repository names before deleting them.

When deleting a repository through the API, it doesn't actually delete it, it
just changes the "visible" flag. If someone wants to re-use a repository name
(such as "main"), they'll then get errors about it already being taken.

This change adds an "archive_name" field which can be sent to PUT
/api/repositories/<id>/. When this field is True, we'll automatically assign a
new name to the repository which shouldn't conflict with anything a user might
choose.
Ran all webapi and scmtools tests
Description From Last Updated

This can be one statement.

chipx86chipx86

assertFalse

chipx86chipx86

assertFalse

chipx86chipx86

if not data.get('archive_name', False)

chipx86chipx86
chipx86
  1. 
      
  2. reviewboard/webapi/resources.py (Diff revision 1)
     
     
     
    Show all issues
    This can be one statement.
  3. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    assertFalse
  4. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    assertFalse
  5. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    if not data.get('archive_name', False)
  6. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.6.x (4b8c396)
Loading...