MCPcopy
hub / github.com/borgbackup/borg / add_callback

Method add_callback

src/borg/archive.py:2000–2004  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

1998 """Analyze and rebuild archives, expecting some damage and trying to make stuff consistent again."""
1999
2000 def add_callback(chunk):
2001 id_ = self.key.id_hash(chunk)
2002 cdata = self.repo_objs.format(id_, {}, chunk, ro_type=ROBJ_ARCHIVE_STREAM)
2003 add_reference(id_, len(chunk), cdata)
2004 return id_
2005
2006 def add_reference(id_, size, cdata):
2007 # either we already have this chunk in repo and chunks index or we add it now

Callers

nothing calls this directly

Calls 2

id_hashMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected