Commit 89ef49c4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9a2b7ac5
...@@ -51,6 +51,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -51,6 +51,7 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
iter := stor.Iterate(tidMin, tidMax) iter := stor.Iterate(tidMin, tidMax)
// transactions // transactions
first := true
for { for {
txni, dataIter, err := iter.NextTxn() txni, dataIter, err := iter.NextTxn()
if err != nil { if err != nil {
...@@ -63,9 +64,14 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -63,9 +64,14 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
} }
// TODO if not first: println // TODO if not first: println
vskip := "\n"
if first {
vskip = ""
first = false
}
_, err = fmt.Fprintf(w, "txn %s (%c)\nuser %q\ndescription %q\nextension %q\n", _, err = fmt.Fprintf(w, "%stxn %s (%c)\nuser %q\ndescription %q\nextension %q\n",
txni.Tid, txni.Status, txni.User, txni.Description, txni.Extension) vskip, txni.Tid, txni.Status, txni.User, txni.Description, txni.Extension)
if err != nil { if err != nil {
break break
} }
...@@ -109,6 +115,11 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly ...@@ -109,6 +115,11 @@ func zodbDump(w io.Writer, stor zodb.IStorage, tidMin, tidMax zodb.Tid, hashOnly
if err != nil { if err != nil {
break break
} }
_, err = w.Write([]byte("\n"))
if err != nil {
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