[PATCH 2 of 2] devel-warn: issue a warning for old style revsets
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri Jun 19 18:41:10 UTC 2015
# 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 13887cc1647ef5a2f39f3ae447fba4961499fa98
# Parent a51f19e7f84edf50d1d751d8f55466bb10f4ba05
devel-warn: issue a warning for old style revsets
We have move to smartset class more than a year ago, we now have the tool to
aggressively nudge developer into upgrading their extensions.
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -319,10 +319,14 @@ def getset(repo, subset, x):
if not x:
raise error.ParseError(_("missing argument"))
s = methods[x[0]](repo, subset, *x[1:])
if util.safehasattr(s, 'isascending'):
return s
+ if (repo.ui.configbool('devel', 'all-warnings')
+ or repo.ui.configbool('devel', 'old-revset')):
+ repo.ui.develwarn('revset use list instead of smartset, '
+ '(upgrade your code)')
return baseset(s)
def _getrevsource(repo, r):
extra = repo[r].extra()
for label in ('source', 'transplant_source', 'rebase_source'):
More information about the Mercurial-devel
mailing list