Commit 4275f2e9 authored by Kirill Smelkov's avatar Kirill Smelkov

restore, commit: Help += note that those tools are low-level

Suggessted by @jerome here: nexedi/zodbtools!19 (comment 129181)

Co-authored-with: Jérome Perrin <jerome@nexedi.com>
/reviewed-on nexedi/zodbtools!19
parent b944e0ee
Pipeline #14230 failed with stage
in 0 seconds
...@@ -173,7 +173,16 @@ On success the ID of committed transaction is printed to stdout. ...@@ -173,7 +173,16 @@ On success the ID of committed transaction is printed to stdout.
Options: Options:
-h --help show this help -h --help show this help
""", file=out) """ + (_low_level_note % "zodb commit"), file=out)
_low_level_note = """
Note: `%s` is low-level tool that creates transactions without checking
data for correctness and consistency at object level. Given incorrect data it
can create transactions with objects that cannot be unpickled, or with objects
that reference other objects that may not already be present in the database.
Such transactions would lead to errors later when accessing those objects at
application level.
"""
@func @func
def main(argv): def main(argv):
......
...@@ -24,7 +24,7 @@ ZODB storage. See Zodbdump documentation for details. ...@@ -24,7 +24,7 @@ ZODB storage. See Zodbdump documentation for details.
from __future__ import print_function from __future__ import print_function
from zodbtools.zodbdump import DumpReader from zodbtools.zodbdump import DumpReader
from zodbtools.zodbcommit import zodbcommit from zodbtools.zodbcommit import zodbcommit, _low_level_note
from zodbtools.util import asbinstream, ashex, storageFromURL from zodbtools.util import asbinstream, ashex, storageFromURL
from golang import func, defer from golang import func, defer
...@@ -64,7 +64,7 @@ On success the ID of every restored transaction is printed to stdout. ...@@ -64,7 +64,7 @@ On success the ID of every restored transaction is printed to stdout.
Options: Options:
-h --help show this help -h --help show this help
""", file=out) """ + (_low_level_note % "zodb restore"), file=out)
@func @func
def main(argv): def main(argv):
......
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