[PATCH] Extensions: allow marking extensions as optional

Matt Mackall mpm at selenic.com
Wed Nov 3 11:58:32 CDT 2010


On Wed, 2010-11-03 at 09:36 -0400, Greg Ward wrote:
> On Wed, Nov 3, 2010 at 8:16 AM, Krzysztof Pawlik
> <krzysiek.pawlik at people.pl> wrote:
> > Hello, same patch, parent is current tip from http://selenic.com/repo/hg
> >
> > # HG changeset patch
> > # User Krzysztof Pawlik (nelchael)
> > # Date 1288611100 -3600
> > # Node ID 7e182dd24fa4e4f18d2b6b2b55433121d05d7906
> > # Parent  0e0a52bd58f941c00b2a1d57f23676fa486e58c3
> > Extensions: allow marking extensions as optional.
> >
> > Failure to load an optional extension does not result in a warning
> > message. Useful when single .hgrc is shared among many different
> > machines (or environments) where some extensions are present only on
> > small subset of them.
> 
> Neat idea!  Also useful when bouncing back and forth between hg
> versions -- e.g. I get annoying warnings about 'progress' when I run
> hg 1.4 for testing.

Except this patch will actually just get you different warnings when
bouncing back to 1.4. More importantly, it will break any extensions
marked optional that -do- exist in 1.4. So I think we can do better than
this patch.

Developer tip: to silence extension warnings on old hg versions, add
"$HOME/missingextensions" to your PYTHONPATH and then add empty foo.py
files in that directory for each extension you don't want to hear about.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list