Comments
Patch
@@ -1269,3 +1269,30 @@ test in problematic encoding
3
$ cd ..
+
+compatibility layer for old extension that does not know smartset
+
+ $ cat <<EOF > lset.py
+ > from mercurial import cmdutil, revset
+ > cmdtable = {}
+ > command = cmdutil.command(cmdtable)
+ > @command('matchlist')
+ > def matchlist(ui, repo, expr):
+ > mf = revset.match(ui, expr)
+ > for c in mf(repo, range(len(repo))):
+ > ui.write('%s\n' % c)
+ > def aslist(repo, subset, x):
+ > revset.getargs(x, 0, 0, 'aslist takes no argument')
+ > return list(subset)
+ > def uisetup(ui):
+ > revset.symbols['aslist'] = aslist
+ > EOF
+
+ $ cd repo
+
+ $ hg --config extensions.lset=../lset.py matchlist 'p1()'
+ 9
+ $ hg --config extensions.lset=../lset.py debugrevspec 'min(aslist())'
+ 0
+
+ $ cd ..