[PATCH 2 of 3] verify: report existence of journal

Benoit Boissinot benoit.boissinot at ens-lyon.org
Sat Oct 31 13:54:30 UTC 2009


On Fri, Oct 30, 2009 at 05:42:43PM +0100, Sune Foldager wrote:
> # HG changeset patch
> # User Sune Foldager <cryo at cyanite.org>
> # Date 1256920868 -3600
> # Node ID 60aedecda1538d2ce1932f466b8f1925ae3c91a8
> # Parent  035e516c15acca1abb1ce845bc1ec9ade88f3c20
> verify: report existence of journal
> 
> diff --git a/mercurial/verify.py b/mercurial/verify.py
> --- a/mercurial/verify.py
> +++ b/mercurial/verify.py
> @@ -7,6 +7,7 @@
>  
>  from node import nullid, short
>  from i18n import _
> +import os
>  import revlog, util, error
>  
>  def verify(repo):
> @@ -105,6 +106,9 @@
>          seen[n] = i
>          return lr
>  
> +    if os.path.exists(repo.sjoin("journal")):
> +        ui.warn(_("partially aborted transaction found - you should run hg recover\n"))
> +

Maybe something closer to the other similar error messages:
mercurial/localrepo.py
559:            raise error.RepoError(_("journal already exists - run hg recover"))

mercurial/transaction.py
153:                self.report(_("rollback failed - please run hg recover\n"))


E.g.: "partial transaction journal exists - run hg recover\n" (not sure
about the first part).

regards,

Benoit

-- 
:wq



More information about the Mercurial-devel mailing list