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

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

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

Co-authored-with: Jérome Perrin <jerome@nexedi.com>
/reviewed-on !19
parent b944e0ee
......@@ -173,7 +173,16 @@ On success the ID of committed transaction is printed to stdout.
Options:
-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
def main(argv):
......
......@@ -24,7 +24,7 @@ ZODB storage. See Zodbdump documentation for details.
from __future__ import print_function
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 golang import func, defer
......@@ -64,7 +64,7 @@ On success the ID of every restored transaction is printed to stdout.
Options:
-h --help show this help
""", file=out)
""" + (_low_level_note % "zodb restore"), file=out)
@func
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