Mercurial > hg
comparison tests/test-revset.t @ 30881:1be65deb3d54
smartset: move set classes and related functions from revset module (API)
These classes are pretty large and independent from revset computation.
2961 mercurial/revset.py
973 mercurial/smartset.py
3934 total
revset.prettyformatset() is renamed to smartset.prettyformat(). Smartset
classes are aliased since they are quite common in revset.py.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 16 Oct 2016 17:28:51 +0900 |
parents | d389f19f14aa |
children | 0b8356705de6 |
comparison
equal
deleted
inserted
replaced
30880:b6c051cd1231 | 30881:1be65deb3d54 |
---|---|
38 > from __future__ import absolute_import | 38 > from __future__ import absolute_import |
39 > from mercurial import ( | 39 > from mercurial import ( |
40 > cmdutil, | 40 > cmdutil, |
41 > node as nodemod, | 41 > node as nodemod, |
42 > revset, | 42 > revset, |
43 > smartset, | |
43 > ) | 44 > ) |
44 > cmdtable = {} | 45 > cmdtable = {} |
45 > command = cmdutil.command(cmdtable) | 46 > command = cmdutil.command(cmdtable) |
46 > @command('debugrevlistspec', | 47 > @command('debugrevlistspec', |
47 > [('', 'optimize', None, 'print parsed tree after optimizing'), | 48 > [('', 'optimize', None, 'print parsed tree after optimizing'), |
57 > opttree = revset.optimize(revset.analyze(tree)) | 58 > opttree = revset.optimize(revset.analyze(tree)) |
58 > ui.note("* optimized:\n", revset.prettyformat(opttree), "\n") | 59 > ui.note("* optimized:\n", revset.prettyformat(opttree), "\n") |
59 > func = revset.match(ui, expr, repo) | 60 > func = revset.match(ui, expr, repo) |
60 > revs = func(repo) | 61 > revs = func(repo) |
61 > if ui.verbose: | 62 > if ui.verbose: |
62 > ui.note("* set:\n", revset.prettyformatset(revs), "\n") | 63 > ui.note("* set:\n", smartset.prettyformat(revs), "\n") |
63 > for c in revs: | 64 > for c in revs: |
64 > ui.write("%s\n" % c) | 65 > ui.write("%s\n" % c) |
65 > EOF | 66 > EOF |
66 $ cat <<EOF >> $HGRCPATH | 67 $ cat <<EOF >> $HGRCPATH |
67 > [extensions] | 68 > [extensions] |