[Python-Dev] Mercurial migration: help needed
Mark Hammond
mhammond at skippinet.com.au
Sat Aug 22 07:02:19 CEST 2009
On 22/08/2009 2:46 PM, Stephen J. Turnbull wrote:
> Mark Hammond writes:
>
> > Something like ~/.hgrules having:
>
> Surely you mean $PROJECTROOT/.hgrules?
Indeed.
> > [config] # or maybe [rules] ?
> > required_extensions = win32text, some_pydev_specific_extension
>
> [extensions]
> required_for_commit = win32text,some_other_ext
>
> That might require a change to hg's ini file semantics if currently it
> refuses to parse [extension] sections in versioned hgrcs.
Yes - I'm not proposing specific names for sections etc - I'm more
interested in getting the concepts across, and fully expect the hg guys
will have their own opinions and make final decisions on the exact spelling.
> Note the change in name: I'm not sure exactly what the semantics
> should be, but surely we want to allow browsing the repository,
> branching, etc without enabling any extensions.
>
> > [Encode]
> > {rules for encoding}
>
> No, there must be a way to indicate that "this is a section for a
> specific extension". Bare [Encode] will be seen as polluting the
> global namespace, and will get a lot of pushback, I think.
Possibly - although I would expect the existing section names be reused
when applied to a versioned file, I'd be more than happy for the hg guys
to declare new names are appropriate for this.
>
> > This way you aren't *enabling* extensions in this versioned file,
>
> True, but how many people will just download the extension and enable
> it?
In the ideal world, exactly as many people who would read the Python
developer guide, then download and install the extension based purely on
that. IOW, it is Python itself setting the policy, so people need to
make their own decisions based on that, regardless of whether the tool
enforces it or not.
> This would open a door to "social engineering". (Personally, *I*
> am not opposed to it on those grounds, but as devil's advocate I do
> want to mention that as an argument you might run into.)
>
> > just listing rules about what extensions must be enabled. From
> > core hg's POV, it doesn't care if the required extensions relate to
> > windows line endings or re-encoding images - it just honours the
> > wishes of the repo owner.
>
> If it refuses the user's request, it should issue a message to the
> effect of "Please enable win32text, which is required in<absolute
> name of .hgrules>."
Agreed.
Thanks,
Mark
More information about the Python-Dev
mailing list