[PATCH] localrepo: better error message with obsmarkers but no evolve

Augie Fackler raf at durin42.com
Thu Sep 10 08:42:44 CDT 2015


On Thu, Sep 10, 2015 at 09:29:48AM -0400, Jordi GutiƩrrez Hermoso wrote:
> # HG changeset patch
> # User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
> # Date 1441891451 14400
> #      Thu Sep 10 09:24:11 2015 -0400
> # Node ID 40f503509524d7b487c8d7b0fe939a52ce966cba
> # Parent  ea489d94e1dc1fc3dc1dcbef1c86c18c49605ed1
> localrepo: better error message with obsmarkers but no evolve
>
> This error message is quite confusing. It seems to be talking about
> some feature that is obsolete, instead of talking about what it's
> really about: evolve.

Obsolete markers are very useful without evolve - you can enable them
and get nice performance wins for things like histedit and rebase. The
error message in core should talk about obsolete markers, not evolve.

(I agree the error message is awful, but it needs to be carefully
wordsmithed so that it is sensible even for people don't know about or
care about evolve.)

>
> Hopefully this wording clarifies matters.
>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -452,7 +452,8 @@ class localrepository(object):
>                                    **kwargs)
>          if store and readonly:
>              self.ui.warn(
> -                _('obsolete feature not enabled but %i markers found!\n')
> +                _('changeset evolution not enabled but %i '
> +                  'obsolescence markers found!\n')
>                  % len(list(store)))
>          return store
>
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -164,7 +164,7 @@ def runhg(cmd, env):
>      err = [e for e in err.splitlines()
>             if not e.startswith(b('not trusting file')) \
>                and not e.startswith(b('warning: Not importing')) \
> -              and not e.startswith(b('obsolete feature not enabled'))]
> +              and not e.startswith(b('changeset evolution not enabled'))]
>      if err:
>          printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
>          printf(b('\n').join([b('  ') + e for e in err]), file=sys.stderr)
> diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
> --- a/tests/test-obsolete.t
> +++ b/tests/test-obsolete.t
> @@ -695,7 +695,7 @@ Checking _enable=False warning if obsole
>    $ echo '[experimental]' >> $HGRCPATH
>    $ echo "evolution=" >> $HGRCPATH
>    $ hg log -r tip
> -  obsolete feature not enabled but 68 markers found!
> +  changeset evolution not enabled but 68 obsolescence markers found!
>    68:c15e9edfca13 (draft) [tip ] add celestine
>
>  reenable for later test
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list