[PATCH 1 of 2 V2] util: add a way to issue deprecation warning without a UI object

Yuya Nishihara yuya at tcha.org
Sat Apr 8 04:16:14 EDT 2017


On Fri, 7 Apr 2017 19:03:55 +0200, Pierre-Yves David wrote:
> On 04/06/2017 05:44 PM, Yuya Nishihara wrote:
> > On Thu, 6 Apr 2017 16:09:07 +0200, Pierre-Yves David wrote:
> >>> If dirty hack allowed, I would do something like the following:
> >>>
> >>>   # util.py
> >>>   def _deprecwarn(msg, version):
> >>>       pass
> >>>
> >>>   # somewhere ui is available, maybe in dispatch.py
> >>>   util._deprecwarn = ui.deprecwarn
> >>
> >> That is a diry hack. I would prefer we did not used it.
> >
> > Yeah, that is dirty and I don't like it. But I'm okay with it as long as
> > it is a temporary hack.
> 
> If you think the dirty hack is worth the potential extra exposure, I'm 
> fine with it.
> 
> However, I'm confused about your usage of "temporary hack" here. Why are 
> you using temporary?

I suppose the hack will hopefully disappear with the vfs compat layer. I'm not
sure if a permanent one is necessary.


More information about the Mercurial-devel mailing list