algos: Add directory_get_many_with_possibly_duplicated_entries
1 unresolved thread
It's like directory_get_many, but allows building directories via Directory.from_possibly_duplicated_entries().
It will be used by swh-scrubber in order not to crash on such directories: swh-scrubber#4693 (closed)
Edited by vlorentz
Merge request reports
Activity
Filter activity
added 1 commit
- 1b84a57c - algos: Add directory_get_many_with_possibly_duplicated_entries
Jenkins job DSTO/gitlab-builds #131 succeeded .
See Console Output and Coverage Report for more details.62 62 raw_manifest=raw_manifests[directory_id], 63 63 ) 64 65 66 def directory_get_many_with_possibly_duplicated_entries( 67 storage: StorageInterface, directory_ids: List[Sha1Git] 68 ) -> Iterable[Optional[Tuple[bool, Directory]]]: 69 """Same as :func:`directory_get_many`, but does not error on directories whose 70 entries may contain duplicated names. 71 See :meth:`swh.model.model.Directory.from_possibly_duplicated_entries`. 72 73 Args: 74 storage: the storage instance 75 directory_ids: the directories' identifiers 76 Yields: 77 ``(is_corrupt, directory)`` where ``is_corrupt`` is True iff some