changeset 44355:7a4e1d245f19

recover: don't verify by default The reason is: - it's not that hard to trigger interrupted transactions: just run out of disk space - it takes forever to verify on large repos. Before --no-verify, I told people to C-c hg recover when the progress bar showed up. Now I tell them to pass --no-verify. - I don't remember a single case where the verification step was useful This is technically a change of behavior. Perhaps this would be better suited for tweakdefaults? Differential Revision: https://phab.mercurial-scm.org/D7972
author Valentin Gatien-Baron <vgatien-baron@janestreet.com>
date Wed, 22 Jan 2020 14:21:34 -0500
parents 2e2cfc3bea0b
children d2da8667125b
files mercurial/commands.py tests/test-fncache.t tests/test-journal-exists.t tests/test-repair-strip.t tests/test-rollback.t
diffstat 5 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Feb 11 00:08:28 2020 -0500
+++ b/mercurial/commands.py	Wed Jan 22 14:21:34 2020 -0500
@@ -5669,7 +5669,7 @@
 
 @command(
     b'recover',
-    [(b'', b'verify', True, b"run `hg verify` after successful recover"),],
+    [(b'', b'verify', False, b"run `hg verify` after successful recover"),],
     helpcategory=command.CATEGORY_MAINTENANCE,
 )
 def recover(ui, repo, **opts):
--- a/tests/test-fncache.t	Tue Feb 11 00:08:28 2020 -0500
+++ b/tests/test-fncache.t	Wed Jan 22 14:21:34 2020 -0500
@@ -356,7 +356,7 @@
   $ cat .hg/store/fncache | sort
   data/y.i
   data/z.i
-  $ hg recover
+  $ hg recover --verify
   rolling back interrupted transaction
   checking changesets
   checking manifests
--- a/tests/test-journal-exists.t	Tue Feb 11 00:08:28 2020 -0500
+++ b/tests/test-journal-exists.t	Wed Jan 22 14:21:34 2020 -0500
@@ -15,11 +15,7 @@
 
   $ hg recover
   rolling back interrupted transaction
-  checking changesets
-  checking manifests
-  crosschecking files in changesets and manifests
-  checking files
-  checked 1 changesets with 1 changes to 1 files
+  (verify step skipped, run `hg verify` to check your repository content)
 
 recover, explicit verify
 
--- a/tests/test-repair-strip.t	Tue Feb 11 00:08:28 2020 -0500
+++ b/tests/test-repair-strip.t	Wed Jan 22 14:21:34 2020 -0500
@@ -25,7 +25,9 @@
   >   else
   >       echo "(no journal)"
   >   fi
-  >   ls .hg/store/journal >/dev/null 2>&1 && hg recover
+  >   if ls .hg/store/journal >/dev/null 2>&1; then
+  >     hg recover --verify
+  >   fi
   >   ls .hg/strip-backup/* >/dev/null 2>&1 && hg unbundle -q .hg/strip-backup/*
   >   rm -rf .hg/strip-backup
   > }
--- a/tests/test-rollback.t	Tue Feb 11 00:08:28 2020 -0500
+++ b/tests/test-rollback.t	Wed Jan 22 14:21:34 2020 -0500
@@ -190,7 +190,7 @@
 
 corrupt journal test
   $ echo "foo" > .hg/store/journal
-  $ hg recover
+  $ hg recover --verify
   rolling back interrupted transaction
   couldn't read journal entry 'foo\n'!
   checking changesets