summaryrefslogtreecommitdiff
path: root/src/buildstream/_artifactcache.py
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-11 21:08:59 +0100
commit386aa2e0eff33ba4ae774e797cf31b50d4b74a02 (patch)
treeb87e7704858bec3d684f1a6e5f26a34d8e00d55a /src/buildstream/_artifactcache.py
parentc45ea0d36a3f7fea67f5b98f2757672c174619aa (diff)
downloadbuildstream-386aa2e0eff33ba4ae774e797cf31b50d4b74a02.tar.gz
_artifactcache.py: Remove unused diff() method
Diffstat (limited to 'src/buildstream/_artifactcache.py')
-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.