Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124610
D3822.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D3822.diff
View Options
diff --git a/swh/storage/interface.py b/swh/storage/interface.py
--- a/swh/storage/interface.py
+++ b/swh/storage/interface.py
@@ -1188,61 +1188,6 @@
"""
...
- @deprecated
- @remote_api_endpoint("algos/diff_directories")
- def diff_directories(self, from_dir, to_dir, track_renaming=False):
- """Compute the list of file changes introduced between two arbitrary
- directories (insertion / deletion / modification / renaming of files).
-
- Args:
- from_dir (bytes): identifier of the directory to compare from
- to_dir (bytes): identifier of the directory to compare to
- track_renaming (bool): whether or not to track files renaming
-
- Returns:
- A list of dict describing the introduced file changes
- (see :func:`swh.storage.algos.diff.diff_directories`
- for more details).
- """
- ...
-
- @deprecated
- @remote_api_endpoint("algos/diff_revisions")
- def diff_revisions(self, from_rev, to_rev, track_renaming=False):
- """Compute the list of file changes introduced between two arbitrary
- revisions (insertion / deletion / modification / renaming of files).
-
- Args:
- from_rev (bytes): identifier of the revision to compare from
- to_rev (bytes): identifier of the revision to compare to
- track_renaming (bool): whether or not to track files renaming
-
- Returns:
- A list of dict describing the introduced file changes
- (see :func:`swh.storage.algos.diff.diff_directories`
- for more details).
- """
- ...
-
- @deprecated
- @remote_api_endpoint("algos/diff_revision")
- def diff_revision(self, revision, track_renaming=False):
- """Compute the list of file changes introduced by a specific revision
- (insertion / deletion / modification / renaming of files) by comparing
- it against its first parent.
-
- Args:
- revision (bytes): identifier of the revision from which to
- compute the list of files changes
- track_renaming (bool): whether or not to track files renaming
-
- Returns:
- A list of dict describing the introduced file changes
- (see :func:`swh.storage.algos.diff.diff_directories`
- for more details).
- """
- ...
-
@remote_api_endpoint("clear/buffer")
def clear_buffers(self, object_types: Optional[List[str]] = None) -> None:
"""For backend storages (pg, storage, in-memory), this is a noop operation. For proxy
diff --git a/swh/storage/postgresql/storage.py b/swh/storage/postgresql/storage.py
--- a/swh/storage/postgresql/storage.py
+++ b/swh/storage/postgresql/storage.py
@@ -51,7 +51,6 @@
RawExtrinsicMetadata,
)
from swh.model.hashutil import DEFAULT_ALGORITHMS, hash_to_bytes, hash_to_hex
-from swh.storage.algos import diff
from swh.storage.exc import StorageArgumentException, StorageDBError, HashCollision
from swh.storage.interface import (
ListOrder,
@@ -1402,18 +1401,6 @@
return None
return MetadataAuthority.from_dict(dict(zip(db.metadata_authority_cols, row)))
- @timed
- def diff_directories(self, from_dir, to_dir, track_renaming=False):
- return diff.diff_directories(self, from_dir, to_dir, track_renaming)
-
- @timed
- def diff_revisions(self, from_rev, to_rev, track_renaming=False):
- return diff.diff_revisions(self, from_rev, to_rev, track_renaming)
-
- @timed
- def diff_revision(self, revision, track_renaming=False):
- return diff.diff_revision(self, revision, track_renaming)
-
def clear_buffers(self, object_types: Optional[List[str]] = None) -> None:
"""Do nothing
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 2:25 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218650
Attached To
D3822: storage/interface: Remove deprecated diff endpoints
Event Timeline
Log In to Comment