# HG changeset patch # User Matt Mackall # Date 2005-11-08 22:22:03 # Node ID 0b1b029b4de36228073eb9a23215276fb3d7c8f2 # Parent 3bd6d27cb81c15089104bc255594c83579e66ca6 Automatically run "verify" whenever we run "recover" diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1732,7 +1732,9 @@ def recover(ui, repo): 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 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -225,9 +225,11 @@ class localrepository: 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()