[PATCH] extensions: change magic "shipped with hg" string

Augie Fackler raf at durin42.com
Wed Aug 24 10:07:01 EDT 2016


On Tue, Aug 23, 2016 at 5:13 PM, Danek Duvall <danek.duvall at oracle.com> wrote:
> Augie Fackler wrote:
>
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1471965968 14400
>> #      Tue Aug 23 11:26:08 2016 -0400
>> # Node ID 03acb58a90985533ac5ca6967b6cb6823a8efc80
>> # Parent  92ac2baaea86dbba8565c359206fb97d39ec6e63
>> extensions: change magic "shipped with hg" string
>>
>> I've caught multiple extensions in the wild lying about being
>> 'internal', so it's time to move the goalposts on people. Goalpost
>> moving will continue until third party extensions stop trying to
>> defeat the system.
>
> Would it be worth generating an arbitrary string on every build?  That
> would improve ease of maintenance, and make it next to impossible for
> third-party extension writers to keep up (short of importing a known
> extension and testing for the value of testedwith).

I've toyed with that, but I haven't come up with a way that would
actually /prevent/ external extensions from using Python's ample
reflection from digging up the magic string required to look internal.
For now, I'm willing to give this trivial method a shot.

>
> Danek


More information about the Mercurial-devel mailing list