[PATCH] win32text: give deprecation warning
Steve Borho
steve at borho.org
Mon Oct 25 13:31:23 CDT 2010
On Mon, Oct 25, 2010 at 11:58 AM, Dan Villiom Podlaski Christiansen
<danchr at gmail.com> wrote:
> On 25 Oct 2010, at 18:29, steve at borho.org wrote:
>
>> @@ -158,9 +158,17 @@
>> def forbidcr(ui, repo, hooktype, node, **kwargs):
>> return forbidnewline(ui, repo, hooktype, node, '\r', **kwargs)
>>
>> +deprwarn = True
>> def reposetup(ui, repo):
>> if not repo.local():
>> return
>> + global deprwarn
>> + if deprwarn:
>> + if ui.configbool('win32text', 'warn', True):
>> + ui.warn(_("win32text is deprecated, see "
>> +
>> "http://mercurial.selenic.com/wiki/Win32TextExtension\n"))
>> + deprwarn = False
>> +
>> for name, fn in _filters.iteritems():
>> repo.adddatafilter(name, fn)
>
> This deprecation warning seems to me to be a bit weak. If we really want
> users to migrate to the EOL extension, I think we should a) point them to it
> and b) threaten them that we'll eventually remove win32text.
The idea is to add those details to the wiki page and keep the warning concise.
--
Steve Borho
More information about the Mercurial-devel
mailing list