lib/db,cmd/stindex: Expose VersionList and use it in stindex

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3231
This commit is contained in:
Audrius Butkevicius
2016-05-31 19:29:26 +00:00
committed by Jakob Borg
parent 1612baca92
commit 6f63909c65
5 changed files with 21 additions and 19 deletions

View File

@@ -39,7 +39,9 @@ func dump(ldb *leveldb.DB) {
case db.KeyTypeGlobal:
folder := nulString(key[1 : 1+64])
name := nulString(key[1+64:])
fmt.Printf("[global] F:%q N:%q V:%x\n", folder, name, it.Value())
var flv db.VersionList
flv.UnmarshalXDR(it.Value())
fmt.Printf("[global] F:%q N:%q V: %s\n", folder, name, flv)
case db.KeyTypeBlock:
folder := nulString(key[1 : 1+64])