Commit 9a2b7ac5 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 270fad44
...@@ -50,6 +50,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -50,6 +50,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
var retErr error var retErr error
iter := stor.Iterate(tidMin, tidMax) iter := stor.Iterate(tidMin, tidMax)
// transactions
for { for {
txni, dataIter, err := iter.NextTxn() txni, dataIter, err := iter.NextTxn()
if err != nil { if err != nil {
...@@ -70,6 +71,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -70,6 +71,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
} }
// data records
for { for {
datai, err := dataIter.NextData() datai, err := dataIter.NextData()
if err != nil { if err != nil {
...@@ -92,7 +94,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -92,7 +94,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
entry += "from " + datai.DataTid.String() entry += "from " + datai.DataTid.String()
default: default:
entry += fmt.Sprintf("sha1:%s %d", sha1.Sum(datai.Data), len(datai.Data)) entry += fmt.Sprintf("sha1:%x %d", sha1.Sum(datai.Data), len(datai.Data))
writeData = true writeData = true
} }
...@@ -108,7 +110,6 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -108,7 +110,6 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
break break
} }
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment