浏览代码

recreate: remove extra confirmation

not experimental any more, user is responsible for avoiding bugs.
the docs still point out that this might be dangerous when used wrongly,
like it also does for prune.
Thomas Waldmann 5 年之前
父节点
当前提交
879ea73aa7
共有 4 个文件被更改,包括 0 次插入13 次删除
  1. 0 2
      docs/internals/frontends.rst
  2. 0 2
      docs/usage/general/environment.rst.inc
  3. 0 8
      src/borg/archiver.py
  4. 0 1
      src/borg/testsuite/archiver.py

+ 0 - 2
docs/internals/frontends.rst

@@ -577,5 +577,3 @@ Prompts
         For "This is a potentially dangerous function..." (check --repair)
     BORG_DELETE_I_KNOW_WHAT_I_AM_DOING
         For "You requested to completely DELETE the repository *including* all archives it contains:"
-    BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING
-        For "This is a potentially dangerous function..." (recreate)

+ 0 - 2
docs/usage/general/environment.rst.inc

@@ -86,8 +86,6 @@ Some automatic "answerers" (if set, they automatically answer confirmation quest
         For "This is a potentially dangerous function..." (check --repair)
     BORG_DELETE_I_KNOW_WHAT_I_AM_DOING=NO (or =YES)
         For "You requested to completely DELETE the repository *including* all archives it contains:"
-    BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING=NO (or =YES)
-        For "This is a potentially dangerous function..." (recreate)
 
     Note: answers are case sensitive. setting an invalid answer value might either give the default
     answer or ask you interactively, depending on whether retries are allowed (they by default are

+ 0 - 8
src/borg/archiver.py

@@ -1710,14 +1710,6 @@ class Archiver:
     @with_repository(cache=True, exclusive=True, compatibility=(Manifest.Operation.CHECK,))
     def do_recreate(self, args, repository, manifest, key, cache):
         """Re-create archives"""
-        msg = ("This is a potentially dangerous function.\n"
-               "recreate might lead to data loss (if used wrongly). BE VERY CAREFUL!\n"
-               "\n"
-               "Type 'YES' if you understand this and want to continue: ")
-        if not yes(msg, false_msg="Aborting.", truish=('YES',),
-                   env_var_override='BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING'):
-            return EXIT_ERROR
-
         matcher = self.build_matcher(args.patterns, args.paths)
         self.output_list = args.output_list
         self.output_filter = args.output_filter

+ 0 - 1
src/borg/testsuite/archiver.py

@@ -252,7 +252,6 @@ class ArchiverTestCaseBase(BaseTestCase):
     def setUp(self):
         os.environ['BORG_CHECK_I_KNOW_WHAT_I_AM_DOING'] = 'YES'
         os.environ['BORG_DELETE_I_KNOW_WHAT_I_AM_DOING'] = 'YES'
-        os.environ['BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING'] = 'YES'
         os.environ['BORG_PASSPHRASE'] = 'waytooeasyonlyfortests'
         self.archiver = not self.FORK_DEFAULT and Archiver() or None
         self.tmpdir = tempfile.mkdtemp()