dotcloud/docker-registry — pull request #268 by wking (2014-03-02 18:14:11+00:00)
Title: The rename from

DELETE /v1/repositories///

(which matches the spec [1,2]) to

DELETE /v1/repositories///tags

(not in the spec) happened in 1026a87 (renaming DELETE call on a repos,
2013-06-26), but the motivation behind the rename is unclear. I'm also not
sure why a delete_repository function is in the registry.tags module (which
already has the expected delete_tag method).

This series restores the original URL, shifts the function to the index
module, triggers tag-deleted signals for each tag, removes the remaining
repository data en masse, and triggers the repository-deleted signal. It
doesn't remove referenced images, because those images might be required by
other repositories. We'd want some sort of refcounting (number of
repositories/tags requiring this image) to decide when image-removal was
allowed.

Most of the above happens in the last commit. The commits leading up
to it factor out helper code to facilitate the final commit and add
signals for repository actions. We'll use the signals later in the
search engine backend (#247), but I add them here because we're
already touching the tag- and repository-removal functions where the
signal raising happens.

[1]: http://docs.docker.io/en/latest/api/registry_api/#delete--v1-repositories-%28namespace%29-%28repository%29-
[2]: http://docs.docker.io/en/latest/api/index_api/#delete--v1-repositories-%28namespace%29-%28repo_name%29-