Em 30-06-2011 02:54, Marius Mårnes Mathiesen escreveu:
On Wed, Jun 29, 2011 at 7:49 PM, Jarrod Roberson <[email protected] <mailto:[email protected]>> wrote:

    On Wednesday, June 29, 2011 1:31:14 PM UTC-4, Jarrod Roberson wrote:

        This is the errors from the log for when I try and delete this
        repository

        ActiveRecord::RecordInvalid (Validation failed: Name has
        already been taken):


    Apparently the repository that I was trying to delete had a clone
    of it, once that clone was deleted I was able to delete it.

    This should be a very friendly message like "This repository has
    clones of it you can't delete it until they are deleted"

    or some such wording instead of the default "oh crap something
    happened" message and the obtuse log entry.


Jarrod,
Any unexpected/unhandled errors are resuced/caught by the fallback handlers defined in application_controller.rb; any errors not handled this way will throw a 500. In this specific case, a ActiveRecord::RecordInvalid is thrown in RepositoriesController#destroy - which indicates the case you're describing is not something dealt with gracefully by Gitorious.

To me this case - that a repository cannot be removed because it has clones - should absolutely be handled more gracefully: - either by checking if it can be deleted in the destroy method in RepositoriesController - or even better by not displaying the delete button (replace it with a description instead) if the repository cannot be removed...

While on the subject, the "Clone" button should also be hidden when the repository was just created but no one pushed to it yet.

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

Reply via email to