[PATCH 2 of 2 V2] devel-warn: issue a warning for old style revsets
Matt Mackall
mpm at selenic.com
Fri Jun 19 17:07:26 CDT 2015
On Fri, 2015-06-19 at 11:50 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1434737831 25200
> # Fri Jun 19 11:17:11 2015 -0700
> # Node ID 33f50a0583a7254f0859ea058ea74843efd5cbdb
> # Parent a51f19e7f84edf50d1d751d8f55466bb10f4ba05
> devel-warn: issue a warning for old style revsets
These are queued for default, thanks.
But this:
> + if (repo.ui.configbool('devel', 'all-warnings')
> + or repo.ui.configbool('devel', 'old-revset')):
..wants to be encapsulated.
Proposal:
# unconditional
ui.develwarn('fast-check', 'stuff is broken')
# conditional with a slowpath
if ui.develwarn('slow-check'):
if someslowfunc():
ui.develwarn('slow-check', 'slow thing is broken')
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list