commit - 730a71f50c224102e5e26481f18a7f2773fd9167
commit + 37fcc2f01565ecba5b08bf3e04cfb7ca4cb51bad
blob - da39b3dd6c7c605c5745234d8a8de9e65d65672e
blob + 1a0e70965e64e6d061bd62e5035363fe8bb88b90
--- swh/loader/git/loader.py
+++ swh/loader/git/loader.py
self.graph = graph
self.f = swapfile
self.offset = -1
+ self.graph_storage_format = "pickle"
def swap_out(self):
if self.offset != -1:
return
self.f.seek(0, io.SEEK_END)
self.offset = self.f.tell()
- self.graph.write_pickle(self.f)
+ self.graph.write(self.f, format=self.graph_storage_format)
del self.graph
def swap_in(self):
if self.offset == -1:
raise ValueError("graph has not been swapped out")
self.f.seek(self.offset, io.SEEK_SET)
- return Graph.Read_Pickel(self.f)
+ return Graph.Read(self.f, format=self.graph_storage_format)
def split_lines_and_remainder(buf: bytes) -> Tuple[List[bytes], bytes]: