summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-08 11:49:02 -0400
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-08 11:49:02 -0400
commit374c4e0ad3f418396414684775d58d0d0beea27e (patch)
tree6555943c21cc7333f29c957d520ae233dcfbfc9f
parente368f29bfc0f1df7ca91dc023cfce69670b78a96 (diff)
downloadbuildstream-374c4e0ad3f418396414684775d58d0d0beea27e.tar.gz
_ostree.py: Removed remove()
The remove() API is not used anywhere, it was previously used by ArtifactCache.remove() which itself was unused. If we need it in the future, it will be right here in the history.
-rw-r--r--buildstream/_ostree.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py
index 80c28af54..40bfda644 100644
--- a/buildstream/_ostree.py
+++ b/buildstream/_ostree.py
@@ -214,29 +214,6 @@ def exists(repo, ref):
return has_object
-# remove():
-#
-# Removes the given commit or symbolic ref from the repo.
-#
-# Args:
-# repo (OSTree.Repo): The repo
-# ref (str): A commit checksum or symbolic ref
-#
-def remove(repo, ref):
-
- # Get the commit checksum, this will:
- #
- # o Return a commit checksum if ref is a symbolic branch
- # o Return the same commit checksum if ref is a valid commit checksum
- # o Return None if the ostree repo doesnt know this ref.
- #
- ref = checksum(repo, ref)
- if ref is None:
- return
-
- repo.delete_object(OSTree.ObjectType.COMMIT, ref, None)
-
-
# checksum():
#
# Returns the commit checksum for a given symbolic ref,