summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-02-10 07:48:20 +0100
committerJürg Billeter <j@bitron.ch>2020-02-10 11:35:06 +0100
commit8d0be8db185ed342a654587fcf84223c50f1f472 (patch)
treea3ee71c55dec97bcceef1de1e5eb02a730c9511e
parent14223dbd6f8fcd43013d529a4ea02bafc0edf1b9 (diff)
downloadbuildstream-8d0be8db185ed342a654587fcf84223c50f1f472.tar.gz
_artifactcache.py: Remove unused diff() method
-rw-r--r--src/buildstream/_artifactcache.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 69a65833c..f1648e947 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -26,7 +26,6 @@ from ._exceptions import ArtifactError, CASError, CacheError, CASRemoteError, Re
from ._protos.buildstream.v2 import buildstream_pb2, buildstream_pb2_grpc, artifact_pb2, artifact_pb2_grpc
from ._remote import BaseRemote
-from ._artifact import Artifact
from . import utils
@@ -205,32 +204,6 @@ class ArtifactCache(BaseCache):
except CacheError as e:
raise ArtifactError("{}".format(e)) from e
- # diff():
- #
- # Return a list of files that have been added or modified between
- # the artifacts described by key_a and key_b. This expects the
- # provided keys to be strong cache keys
- #
- # Args:
- # element (Element): The element whose artifacts to compare
- # key_a (str): The first artifact strong key
- # key_b (str): The second artifact strong key
- #
- def diff(self, element, key_a, key_b):
- context = self.context
- artifact_a = Artifact(element, context, strong_key=key_a)
- artifact_b = Artifact(element, context, strong_key=key_b)
- digest_a = artifact_a._get_proto().files
- digest_b = artifact_b._get_proto().files
-
- added = []
- removed = []
- modified = []
-
- self.cas.diff_trees(digest_a, digest_b, added=added, removed=removed, modified=modified)
-
- return modified, removed, added
-
# push():
#
# Push committed artifact to remote repository.