Automatically run "verify" whenever we run "recover"
authorMatt Mackall <mpm@selenic.com>
Tue, 08 Nov 2005 14:22:03 -0800
changeset 1516 0b1b029b4de3
parent 1515 3bd6d27cb81c
child 1519 5b19dea9d4fd
Automatically run "verify" whenever we run "recover"
mercurial/commands.py
mercurial/localrepo.py
--- a/mercurial/commands.py	Tue Nov 08 10:36:23 2005 -0800
+++ b/mercurial/commands.py	Tue Nov 08 14:22:03 2005 -0800
@@ -1732,7 +1732,9 @@
     This command tries to fix the repository status after an interrupted
     operation. It should only be necessary when Mercurial suggests it.
     """
-    repo.recover()
+    if repo.recover():
+        return repo.verify()
+    return False
 
 def remove(ui, repo, pat, *pats, **opts):
     """remove the specified files on the next commit
--- a/mercurial/localrepo.py	Tue Nov 08 10:36:23 2005 -0800
+++ b/mercurial/localrepo.py	Tue Nov 08 14:22:03 2005 -0800
@@ -225,9 +225,11 @@
         lock = self.lock()
         if os.path.exists(self.join("journal")):
             self.ui.status(_("rolling back interrupted transaction\n"))
-            return transaction.rollback(self.opener, self.join("journal"))
+            transaction.rollback(self.opener, self.join("journal"))
+            return True
         else:
             self.ui.warn(_("no interrupted transaction available\n"))
+            return False
 
     def undo(self):
         lock = self.lock()