Address concerns from pull request.

This commit is contained in:
Jake Moshenko 2015-02-18 10:43:08 -05:00
parent 579d900ef2
commit 2cd5bdb563
3 changed files with 3 additions and 6 deletions

View file

@ -1805,7 +1805,6 @@ def delete_tag(namespace_name, repository_name, tag_name):
Namespace.username == namespace_name, Namespace.username == namespace_name,
RepositoryTag.name == tag_name)) RepositoryTag.name == tag_name))
found = db_for_update(query).get() found = db_for_update(query).get()
except RepositoryTag.DoesNotExist: except RepositoryTag.DoesNotExist:
msg = ('Invalid repository tag \'%s\' on repository \'%s/%s\'' % msg = ('Invalid repository tag \'%s\' on repository \'%s/%s\'' %
(tag_name, namespace_name, repository_name)) (tag_name, namespace_name, repository_name))

View file

@ -509,7 +509,7 @@ ImageHistoryTree.prototype.buildRoot_ = function() {
/** /**
* Prunes images which are not referenced either directly or indireclty by any tag. * Prunes images which are not referenced either directly or indirectly by any tag.
*/ */
ImageHistoryTree.prototype.pruneUnreferenced_ = function(node) { ImageHistoryTree.prototype.pruneUnreferenced_ = function(node) {
if (node.children) { if (node.children) {

View file

@ -167,10 +167,8 @@ class TestGarbageColection(unittest.TestCase):
""" Repository has multiple tags with shared images. Selectively deleting the tags, and """ Repository has multiple tags with shared images. Selectively deleting the tags, and
verifying at each step. verifying at each step.
""" """
repository = self.createRepository(latest=['i1', 'i2', 'i3'], repository = self.createRepository(latest=['i1', 'i2', 'i3'], other=['i1', 'f1', 'f2'],
other=['i1', 'f1', 'f2'], third=['t1', 't2', 't3'], fourth=['i1', 'f1'])
third=['t1', 't2', 't3'],
fourth=['i1', 'f1'])
# Delete tag other. Should delete f2, since it is not shared. # Delete tag other. Should delete f2, since it is not shared.
self.deleteTag(repository, 'other') self.deleteTag(repository, 'other')