Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9749674
D8693.id31404.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
D8693.id31404.diff
View Options
diff --git a/requirements-swh.txt b/requirements-swh.txt
--- a/requirements-swh.txt
+++ b/requirements-swh.txt
@@ -1,4 +1,4 @@
swh.storage >= 0.11.3
-swh.model >= 4.3.0
+swh.model >= 6.6.0
swh.scheduler >= 0.0.39
swh.loader.core >= 3.0.0
diff --git a/swh/loader/svn/replay.py b/swh/loader/svn/replay.py
--- a/swh/loader/svn/replay.py
+++ b/swh/loader/svn/replay.py
@@ -209,8 +209,6 @@
self.svnrepo = svnrepo
self.editor = svnrepo.swhreplay.editor
- self.editor.modified_paths.add(path)
-
def change_prop(self, key: str, value: str) -> None:
if key == properties.PROP_EXECUTABLE:
if value is None: # bit flip off
@@ -403,10 +401,6 @@
self.editor = svnrepo.swhreplay.editor
self.externals: Dict[str, List[ExternalDefinition]] = {}
- # repository root dir has empty path
- if path:
- self.editor.modified_paths.add(path)
-
def remove_child(self, path: bytes) -> None:
"""Remove a path from the current objects.
@@ -439,8 +433,6 @@
if state_path.startswith(fullpath + b"/"):
del self.file_states[state_path]
- self.editor.modified_paths.discard(path)
-
def open_directory(self, path: str, *args) -> DirEditor:
"""Updating existing directory."""
return DirEditor(
@@ -724,7 +716,6 @@
# update from_disk model and store external paths
self.editor.external_paths[dest_fullpath] += 1
- self.editor.modified_paths.add(dest_fullpath)
if os.path.isfile(temp_path):
if os.path.islink(fullpath):
@@ -772,8 +763,6 @@
for external_path in external_paths:
self.editor.external_paths[external_path] += 1
- self.editor.modified_paths.update(external_paths)
-
# ensure hash update for the directory with externals set
self.directory[self.path].update_hash(force=True)
@@ -866,8 +855,6 @@
self.externals_cache: Dict[ExternalDefinition, bytes] = {}
self.svnrepo = svnrepo
self.revnum = None
- # to store the set of paths added or modified when replaying a revision
- self.modified_paths: Set[bytes] = set()
def set_target_revision(self, revnum) -> None:
self.revnum = revnum
@@ -879,8 +866,6 @@
pass
def open_root(self, base_revnum: int) -> DirEditor:
- # a new revision is being replayed so clear the modified_paths set
- self.modified_paths.clear()
return DirEditor(
self.directory,
rootpath=self.rootpath,
@@ -946,9 +931,8 @@
skipped_contents: List[SkippedContent] = []
directories: List[Directory] = []
- directories.append(self.editor.directory.to_model())
- for path in self.editor.modified_paths:
- obj = self.directory[path].to_model()
+ for obj_node in self.directory.collect():
+ obj = obj_node.to_model() # type: ignore
obj_type = obj.object_type
if obj_type in (Content.object_type, DiskBackedContent.object_type):
contents.append(obj.with_data())
@@ -956,6 +940,8 @@
skipped_contents.append(obj)
elif obj_type == Directory.object_type:
directories.append(obj)
+ else:
+ assert False, obj_type
return contents, skipped_contents, directories
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 24, 6:05 PM (4 d, 13 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219811
Attached To
D8693: replay: Use swh.model.from_disk.Directory.collect
Event Timeline
Log In to Comment