aboutsummaryrefslogtreecommitdiff
path: root/repo.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-23 18:10:30 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-23 18:10:30 +0200
commita07bbe4ef22d642347d18f0e0a62d24868500d23 (patch)
treedd634dc57d5525033146c197dc6822a8c0466eb0 /repo.go
parente4f6bf0d972b8e851a6fcaa20c1f305680f61884 (diff)
downloaddna-backup-a07bbe4ef22d642347d18f0e0a62d24868500d23.tar.gz
dna-backup-a07bbe4ef22d642347d18f0e0a62d24868500d23.zip
Testing with Fdelta as the differ
Diffstat (limited to 'repo.go')
-rw-r--r--repo.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/repo.go b/repo.go
index 8c3fa5f..06524aa 100644
--- a/repo.go
+++ b/repo.go
@@ -125,8 +125,8 @@ func NewRepo(path string) *Repo {
sketchSfCount: 3,
sketchFCount: 4,
pol: p,
- differ: &Bsdiff{},
- patcher: &Bsdiff{},
+ differ: Fdelta{},
+ patcher: Fdelta{},
fingerprints: make(FingerprintMap),
sketches: make(SketchMap),
chunkCache: cache.NewFifoCache(10000),
@@ -154,9 +154,13 @@ func (r *Repo) Commit(source string) {
newChunkPath := filepath.Join(newPath, chunksName)
os.Mkdir(newPath, 0775) // TODO: handle errors
os.Mkdir(newChunkPath, 0775) // TODO: handle errors
+ logger.Info("listing files")
files := listFiles(source)
+ logger.Info("loading previous hashes")
r.loadHashes(versions)
+ logger.Info("loading previous file lists")
r.loadFileLists(versions)
+ logger.Info("loading previous recipies")
r.loadRecipes(versions)
storeQueue := make(chan chunkData, 32)
storeEnd := make(chan bool)
@@ -164,7 +168,7 @@ func (r *Repo) Commit(source string) {
var last, nlast, pass uint64
var recipe []Chunk
for ; nlast > last || pass == 0; pass++ {
- logger.Infof("pass number %d", pass+1)
+ logger.Infof("matcher pass number %d", pass+1)
last = nlast
reader, writer := io.Pipe()
go concatFiles(&files, writer)