Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/replay.py
Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | def remove_external_path( | ||||
root_path: Optional[bytes] = None, | root_path: Optional[bytes] = None, | ||||
) -> None: | ) -> None: | ||||
"""Remove a previously exported SVN external path from | """Remove a previously exported SVN external path from | ||||
the reconstructed filesystem. | the reconstructed filesystem. | ||||
""" | """ | ||||
path = root_path if root_path else self.path | path = root_path if root_path else self.path | ||||
fullpath = os.path.join(path, external_path) | fullpath = os.path.join(path, external_path) | ||||
if self.editor.debug: | |||||
logger.debug("Removing external path %s", fullpath) | |||||
# decrement number of references for external path when we really remove it | # decrement number of references for external path when we really remove it | ||||
# (when remove_subpaths is False, we just cleanup the external path before | # (when remove_subpaths is False, we just cleanup the external path before | ||||
# copying exported paths in it) | # copying exported paths in it) | ||||
if force or (fullpath in self.editor.external_paths and remove_subpaths): | if force or (fullpath in self.editor.external_paths and remove_subpaths): | ||||
self.editor.external_paths[fullpath] -= 1 | self.editor.external_paths[fullpath] -= 1 | ||||
if ( | if ( | ||||
fullpath in self.editor.external_paths | fullpath in self.editor.external_paths | ||||
▲ Show 20 Lines • Show All 241 Lines • Show Last 20 Lines |