ProjrcExtension questions
Angel Ezquerra
angel.ezquerra at gmail.com
Tue Dec 20 15:35:48 UTC 2011
On Tue, Dec 20, 2011 at 11:38 AM, <David.Sedlock at lantiq.com> wrote:
>> >> Am I correct in assuming that most users of this extension do not use
>> >> TortoiseHg?
>
> No. We use the extension with both windows and unix clients.
>
>> I'm thinking that it may make sense to have a third panel appear on
>> the TortoiseHg settings dialog if the projrc extension is enabled,
>> which would show the projrc settings in a read-only manner....
>
> This is a very good idea! THG currently doesn't display the options set via projrc.
>
> -David
Adding simple support for the projrc extension to TortoiseHg should be
easy. It is a simple matter of adding a third "global project"
settings panel to the settings dialog whenever the projrc extension is
enabled and a projrc file is found on the current repo. I already have
small patch that adds this basic support and it seems to work fine.
What is more tricky is deciding how to handle this projrc file. As it
is, the settings dialog will let you modify the .hg/projrc file.
However your changes will get overwritten as soon as you perform new
pull operation. On the other hand, modifying the projrc file is a
sensible operation _on the server_ and in there it may come handy to
be able to modify the projrc file via the TortoiseHg interface.
Perhaps TortoiseHg could check whether the projrc file begins with
what you call the "ENCODING_CHECK" string. If it does TortoiseHg could
consider the projrc file read-only (or perhaps show a warning when you
try to save the settings). If the encoding check is not found it could
be saved as the regular hgrc files.
In addition, I think that for safety reasons the extension itself
should warn the user whenever the projrc that is being download from
the server does not match the current projrc file that was stored
locally. In fact it would be safest if the extension asked the user to
confirm whether it wants to accept the new projrc file or not. That
would make it much harder for the user to inadvertently get new
(potentially dangerous) settings from the project file.
Cheers,
Angel
More information about the Mercurial
mailing list