Show More
@@ -321,6 +321,13 b' def getset(repo, subset, x):' | |||
|
321 | 321 | s = methods[x[0]](repo, subset, *x[1:]) |
|
322 | 322 | if util.safehasattr(s, 'isascending'): |
|
323 | 323 | return s |
|
324 | if (repo.ui.configbool('devel', 'all-warnings') | |
|
325 | or repo.ui.configbool('devel', 'old-revset')): | |
|
326 | # else case should not happen, because all non-func are internal, | |
|
327 | # ignoring for now. | |
|
328 | if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols: | |
|
329 | repo.ui.develwarn('revset "%s" use list instead of smartset, ' | |
|
330 | '(upgrade your code)' % x[1][1]) | |
|
324 | 331 | return baseset(s) |
|
325 | 332 | |
|
326 | 333 | def _getrevsource(repo, r): |
@@ -3,7 +3,7 b'' | |||
|
3 | 3 | > """A small extension that acquire locks in the wrong order |
|
4 | 4 | > """ |
|
5 | 5 | > |
|
6 | > from mercurial import cmdutil, repair | |
|
6 | > from mercurial import cmdutil, repair, revset | |
|
7 | 7 | > |
|
8 | 8 | > cmdtable = {} |
|
9 | 9 | > command = cmdutil.command(cmdtable) |
@@ -47,6 +47,11 b'' | |||
|
47 | 47 | > repair.strip(repo.ui, repo, [repo['.'].node()]) |
|
48 | 48 | > finally: |
|
49 | 49 | > lo.release() |
|
50 | > | |
|
51 | > def oldstylerevset(repo, subset, x): | |
|
52 | > return list(subset) | |
|
53 | > | |
|
54 | > revset.symbols['oldstyle'] = oldstylerevset | |
|
50 | 55 | > EOF |
|
51 | 56 | |
|
52 | 57 | $ cat << EOF >> $HGRCPATH |
@@ -106,4 +111,8 b'' | |||
|
106 | 111 | (contact your extension maintainer) |
|
107 | 112 | [255] |
|
108 | 113 | |
|
114 | $ hg log -r "oldstyle()" -T '{rev}\n' | |
|
115 | devel-warn: revset "oldstyle" use list instead of smartset, (upgrade your code) at: */mercurial/revset.py:* (mfunc) (glob) | |
|
116 | 0 | |
|
117 | ||
|
109 | 118 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now