Mercurial > public > mercurial-scm > hg
diff tests/test-devel-warnings.t @ 25630:c88082baf693
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 19 Jun 2015 11:17:11 -0700 |
parents | 678d0bfdd31a |
children | ba5f20450b10 |
line wrap: on
line diff
--- a/tests/test-devel-warnings.t Fri Jun 19 11:19:45 2015 -0700 +++ b/tests/test-devel-warnings.t Fri Jun 19 11:17:11 2015 -0700 @@ -3,7 +3,7 @@ > """A small extension that acquire locks in the wrong order > """ > - > from mercurial import cmdutil, repair + > from mercurial import cmdutil, repair, revset > > cmdtable = {} > command = cmdutil.command(cmdtable) @@ -47,6 +47,11 @@ > repair.strip(repo.ui, repo, [repo['.'].node()]) > finally: > lo.release() + > + > def oldstylerevset(repo, subset, x): + > return list(subset) + > + > revset.symbols['oldstyle'] = oldstylerevset > EOF $ cat << EOF >> $HGRCPATH @@ -106,4 +111,8 @@ (contact your extension maintainer) [255] + $ hg log -r "oldstyle()" -T '{rev}\n' + devel-warn: revset "oldstyle" use list instead of smartset, (upgrade your code) at: */mercurial/revset.py:* (mfunc) (glob) + 0 + $ cd ..