Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/ra.py
Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | def remove_child(self, path): | ||||
""" | """ | ||||
try: | try: | ||||
entry_removed = self.directory[path] | entry_removed = self.directory[path] | ||||
except KeyError: | except KeyError: | ||||
entry_removed = None | entry_removed = None | ||||
else: | else: | ||||
del self.directory[path] | del self.directory[path] | ||||
fpath = os.path.join(self.rootpath, path) | fpath = os.path.join(self.rootpath, path) | ||||
if isinstance(entry_removed, Directory): | if isinstance(entry_removed, from_disk.Directory): | ||||
shutil.rmtree(fpath) | shutil.rmtree(fpath) | ||||
else: | else: | ||||
os.remove(fpath) | os.remove(fpath) | ||||
if path in EOL_STYLE: | if path in EOL_STYLE: | ||||
del EOL_STYLE[path] | del EOL_STYLE[path] | ||||
def update_checksum(self): | def update_checksum(self): | ||||
raise NotImplementedError("This should be implemented.") | raise NotImplementedError("This should be implemented.") | ||||
▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines |