Mercurial > hg
annotate tests/test-revset.t @ 42077:b8c2dc367cc3
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description
Differential Revision: https://phab.mercurial-scm.org/D6213
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 05 Apr 2019 11:12:08 -0700 |
parents | c70bdd222dcd |
children | 29798c9ba5c9 6bc1245cd598 |
rev | line source |
---|---|
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1 $ HGENCODING=utf-8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2 $ export HGENCODING |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
3 $ cat > testrevset.py << EOF |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
4 > import mercurial.revset |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
5 > |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
6 > baseset = mercurial.revset.baseset |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
7 > |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
8 > def r3232(repo, subset, x): |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
9 > """"simple revset that return [3,2,3,2] |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
10 > |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
11 > revisions duplicated on purpose. |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
12 > """ |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
13 > if 3 not in subset: |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
14 > if 2 in subset: |
41738
c70bdd222dcd
tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
41680
diff
changeset
|
15 > return baseset([2, 2]) |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
16 > return baseset() |
41738
c70bdd222dcd
tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
41680
diff
changeset
|
17 > return baseset([3, 3, 2, 2]) |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
18 > |
36379
28551d4c5ee8
py3: add b'' prefixes in test-revset.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35542
diff
changeset
|
19 > mercurial.revset.symbols[b'r3232'] = r3232 |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
20 > EOF |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
21 $ cat >> $HGRCPATH << EOF |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
22 > [extensions] |
33377 | 23 > drawdag=$TESTDIR/drawdag.py |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
24 > testrevset=$TESTTMP/testrevset.py |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
25 > EOF |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
26 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
27 $ try() { |
14098
9f5a0acb0056
revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents:
14080
diff
changeset
|
28 > hg debugrevspec --debug "$@" |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
29 > } |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
30 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
31 $ log() { |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
32 > hg log --template '{rev}\n' -r "$1" |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
33 > } |
11419 | 34 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
35 extension to build '_intlist()' and '_hexlist()', which is necessary because |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
36 these predicates use '\0' as a separator: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
37 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
38 $ cat <<EOF > debugrevlistspec.py |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
39 > from __future__ import absolute_import |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
40 > from mercurial import ( |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
41 > node as nodemod, |
32337
46ba2cdda476
registrar: move cmdutil.command to registrar module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
31920
diff
changeset
|
42 > registrar, |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
43 > revset, |
31024
0b8356705de6
revset: split language services to revsetlang module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
30881
diff
changeset
|
44 > revsetlang, |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
45 > ) |
38261
f3033692ccef
stringutil: promote smartset.prettyformat() to utility function
Yuya Nishihara <yuya@tcha.org>
parents:
37867
diff
changeset
|
46 > from mercurial.utils import stringutil |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
47 > cmdtable = {} |
32337
46ba2cdda476
registrar: move cmdutil.command to registrar module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
31920
diff
changeset
|
48 > command = registrar.command(cmdtable) |
33097
fce4ed2912bb
py3: make sure commands name are bytes in tests
Pulkit Goyal <7895pulkit@gmail.com>
parents:
33080
diff
changeset
|
49 > @command(b'debugrevlistspec', |
36379
28551d4c5ee8
py3: add b'' prefixes in test-revset.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35542
diff
changeset
|
50 > [(b'', b'optimize', None, b'print parsed tree after optimizing'), |
28551d4c5ee8
py3: add b'' prefixes in test-revset.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35542
diff
changeset
|
51 > (b'', b'bin', None, b'unhexlify arguments')]) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
52 > def debugrevlistspec(ui, repo, fmt, *args, **opts): |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
53 > if opts['bin']: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
54 > args = map(nodemod.bin, args) |
31024
0b8356705de6
revset: split language services to revsetlang module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
30881
diff
changeset
|
55 > expr = revsetlang.formatspec(fmt, list(args)) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
56 > if ui.verbose: |
37350
e32dfff71529
revset: use revsymbol() for checking if a symbol is valid
Martin von Zweigbergk <martinvonz@google.com>
parents:
36685
diff
changeset
|
57 > tree = revsetlang.parse(expr, lookup=revset.lookupfn(repo)) |
36582
27911e0fb50e
tests: add missing b prefixes and fix a %s to %d in test-revset.t
Augie Fackler <augie@google.com>
parents:
36379
diff
changeset
|
58 > ui.note(revsetlang.prettyformat(tree), b"\n") |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
59 > if opts["optimize"]: |
31024
0b8356705de6
revset: split language services to revsetlang module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
30881
diff
changeset
|
60 > opttree = revsetlang.optimize(revsetlang.analyze(tree)) |
36379
28551d4c5ee8
py3: add b'' prefixes in test-revset.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35542
diff
changeset
|
61 > ui.note(b"* optimized:\n", revsetlang.prettyformat(opttree), |
28551d4c5ee8
py3: add b'' prefixes in test-revset.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35542
diff
changeset
|
62 > b"\n") |
37674
f83cb91b052e
revset: pass in lookup function instead of repo (API)
Yuya Nishihara <yuya@tcha.org>
parents:
37350
diff
changeset
|
63 > func = revset.match(ui, expr, lookup=revset.lookupfn(repo)) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
64 > revs = func(repo) |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
65 > if ui.verbose: |
38261
f3033692ccef
stringutil: promote smartset.prettyformat() to utility function
Yuya Nishihara <yuya@tcha.org>
parents:
37867
diff
changeset
|
66 > ui.note(b"* set:\n", stringutil.prettyrepr(revs), b"\n") |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
67 > for c in revs: |
36582
27911e0fb50e
tests: add missing b prefixes and fix a %s to %d in test-revset.t
Augie Fackler <augie@google.com>
parents:
36379
diff
changeset
|
68 > ui.write(b"%d\n" % c) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
69 > EOF |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
70 $ cat <<EOF >> $HGRCPATH |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
71 > [extensions] |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
72 > debugrevlistspec = $TESTTMP/debugrevlistspec.py |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
73 > EOF |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
74 $ trylist() { |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
75 > hg debugrevlistspec --debug "$@" |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
76 > } |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
77 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
78 $ hg init repo |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
79 $ cd repo |
11419 | 80 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
81 $ echo a > a |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
82 $ hg branch a |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
83 marked working directory as branch a |
15615 | 84 (branches are permanent and global, did you want a bookmark?) |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
85 $ hg ci -Aqm0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
86 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
87 $ echo b > b |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
88 $ hg branch b |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
89 marked working directory as branch b |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
90 $ hg ci -Aqm1 |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
91 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
92 $ rm a |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
93 $ hg branch a-b-c- |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
94 marked working directory as branch a-b-c- |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
95 $ hg ci -Aqm2 -u Bob |
11419 | 96 |
16661
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
97 $ hg log -r "extra('branch', 'a-b-c-')" --template '{rev}\n' |
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
98 2 |
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
99 $ hg log -r "extra('branch')" --template '{rev}\n' |
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
100 0 |
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
101 1 |
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
102 2 |
16824
f3b8c82a559c
revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents:
16823
diff
changeset
|
103 $ hg log -r "extra('branch', 're:a')" --template '{rev} {branch}\n' |
f3b8c82a559c
revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents:
16823
diff
changeset
|
104 0 a |
f3b8c82a559c
revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents:
16823
diff
changeset
|
105 2 a-b-c- |
16661
de4b42daf396
revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents:
16640
diff
changeset
|
106 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
107 $ hg co 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
109 $ hg branch +a+b+c+ |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
110 marked working directory as branch +a+b+c+ |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
111 $ hg ci -Aqm3 |
11419 | 112 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
113 $ hg co 2 # interleave |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
114 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
115 $ echo bb > b |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
116 $ hg branch -- -a-b-c- |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
117 marked working directory as branch -a-b-c- |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
118 $ hg ci -Aqm4 -d "May 12 2005" |
11419 | 119 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
120 $ hg co 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
121 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
16851
c739227b5eea
test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16824
diff
changeset
|
122 $ hg branch !a/b/c/ |
c739227b5eea
test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16824
diff
changeset
|
123 marked working directory as branch !a/b/c/ |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
124 $ hg ci -Aqm"5 bug" |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
125 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
126 $ hg merge 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
127 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
128 (branch merge, don't forget to commit) |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
129 $ hg branch _a_b_c_ |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
130 marked working directory as branch _a_b_c_ |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
131 $ hg ci -Aqm"6 issue619" |
11419 | 132 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
133 $ hg branch .a.b.c. |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
134 marked working directory as branch .a.b.c. |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
135 $ hg ci -Aqm7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
136 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
137 $ hg branch all |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
138 marked working directory as branch all |
11419 | 139 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
140 $ hg co 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
141 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
142 $ hg branch é |
12942
05fffd665170
tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12786
diff
changeset
|
143 marked working directory as branch \xc3\xa9 (esc) |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
144 $ hg ci -Aqm9 |
11419 | 145 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
146 $ hg tag -r6 1.0 |
24904
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
147 $ hg bookmark -r6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
11419 | 148 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
149 $ hg clone --quiet -U -r 7 . ../remote1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
150 $ hg clone --quiet -U -r 8 . ../remote2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
151 $ echo "[paths]" >> .hg/hgrc |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
152 $ echo "default = ../remote1" >> .hg/hgrc |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
153 |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
154 trivial |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
155 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
156 $ try 0:1 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
157 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
158 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
159 (symbol '1')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
160 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
161 <spanset+ 0:2> |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
162 0 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
163 1 |
25819
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
164 $ try --optimize : |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
165 (rangeall |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
166 None) |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
167 * optimized: |
30803
d389f19f14aa
revset: do not transform range* operators in parsed tree
Yuya Nishihara <yuya@tcha.org>
parents:
30783
diff
changeset
|
168 (rangeall |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
169 None) |
25819
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
170 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
171 <spanset+ 0:10> |
25819
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
172 0 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
173 1 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
174 2 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
175 3 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
176 4 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
177 5 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
178 6 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
179 7 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
180 8 |
be29d26e2949
revset: parse nullary ":" operator as "0:tip"
Yuya Nishihara <yuya@tcha.org>
parents:
25766
diff
changeset
|
181 9 |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
182 $ try 3::6 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
183 (dagrange |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
184 (symbol '3') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
185 (symbol '6')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
186 * set: |
26061
be8a4e0800d8
reachableroots: use baseset lazy sorting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26020
diff
changeset
|
187 <baseset+ [3, 5, 6]> |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
188 3 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
189 5 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
190 6 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
191 $ try '0|1|2' |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
192 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
193 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
194 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
195 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
196 (symbol '2'))) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
197 * set: |
25343
7fbef7932af9
revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents:
25309
diff
changeset
|
198 <baseset [0, 1, 2]> |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
199 0 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
200 1 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
201 2 |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
202 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
203 names that should work without quoting |
11419 | 204 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
205 $ try a |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
206 (symbol 'a') |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
207 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
208 <baseset [0]> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
209 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
210 $ try b-a |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
211 (minus |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
212 (symbol 'b') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
213 (symbol 'a')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
214 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
215 <filteredset |
28423
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
216 <baseset [1]>, |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
217 <not |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
218 <baseset [0]>>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
219 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
220 $ try _a_b_c_ |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
221 (symbol '_a_b_c_') |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
222 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
223 <baseset [6]> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
224 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
225 $ try _a_b_c_-a |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
226 (minus |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
227 (symbol '_a_b_c_') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
228 (symbol 'a')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
229 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
230 <filteredset |
28423
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
231 <baseset [6]>, |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
232 <not |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
233 <baseset [0]>>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
234 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
235 $ try .a.b.c. |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
236 (symbol '.a.b.c.') |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
237 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
238 <baseset [7]> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
239 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
240 $ try .a.b.c.-a |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
241 (minus |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
242 (symbol '.a.b.c.') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
243 (symbol 'a')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
244 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
245 <filteredset |
28423
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
246 <baseset [7]>, |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
247 <not |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
248 <baseset [0]>>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
249 7 |
25901
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
250 |
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
251 names that should be caught by fallback mechanism |
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
252 |
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
253 $ try -- '-a-b-c-' |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
254 (symbol '-a-b-c-') |
25901
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
255 * set: |
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
256 <baseset [4]> |
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
257 4 |
0203c50a589f
debugrevspec: pass lookup function to visualize fallback mechanism
Yuya Nishihara <yuya@tcha.org>
parents:
25819
diff
changeset
|
258 $ log -a-b-c- |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
259 4 |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
260 $ try '+a+b+c+' |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
261 (symbol '+a+b+c+') |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
262 * set: |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
263 <baseset [3]> |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
264 3 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
265 $ try '+a+b+c+:' |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
266 (rangepost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
267 (symbol '+a+b+c+')) |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
268 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
269 <spanset+ 3:10> |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
270 3 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
271 4 |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
272 5 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
273 6 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
274 7 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
275 8 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
276 9 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
277 $ try ':+a+b+c+' |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
278 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
279 (symbol '+a+b+c+')) |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
280 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
281 <spanset+ 0:4> |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
282 0 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
283 1 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
284 2 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
285 3 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
286 $ try -- '-a-b-c-:+a+b+c+' |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
287 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
288 (symbol '-a-b-c-') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
289 (symbol '+a+b+c+')) |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
290 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
291 <spanset- 3:5> |
25902
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
292 4 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
293 3 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
294 $ log '-a-b-c-:+a+b+c+' |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
295 4 |
5214cbdc37e5
revset: port parsing rule of old-style ranges from scmutil.revrange()
Yuya Nishihara <yuya@tcha.org>
parents:
25901
diff
changeset
|
296 3 |
20781
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
297 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
298 $ try -- -a-b-c--a # complains |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
299 (minus |
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
300 (minus |
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
301 (minus |
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
302 (negate |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
303 (symbol 'a')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
304 (symbol 'b')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
305 (symbol 'c')) |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
306 (negate |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
307 (symbol 'a'))) |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
308 abort: unknown revision '-a'! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
309 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
310 $ try é |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
311 (symbol '\xc3\xa9') |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
312 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
313 <baseset [9]> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
314 9 |
11419 | 315 |
20781
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
316 no quoting needed |
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
317 |
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
318 $ log ::a-b-c- |
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
319 0 |
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
320 1 |
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
321 2 |
8ecfa225bd16
revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents:
20736
diff
changeset
|
322 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
323 quoting needed |
11419 | 324 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
325 $ try '"-a-b-c-"-a' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
326 (minus |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
327 (string '-a-b-c-') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
328 (symbol 'a')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
329 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
330 <filteredset |
28423
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
331 <baseset [4]>, |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
332 <not |
0d79d91ba7e3
revset: add extra data to filteredset for better inspection
Yuya Nishihara <yuya@tcha.org>
parents:
28394
diff
changeset
|
333 <baseset [0]>>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
334 4 |
11882
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
335 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
336 $ log '1 or 2' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
337 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
338 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
339 $ log '1|2' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
340 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
341 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
342 $ log '1 and 2' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
343 $ log '1&2' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
344 $ try '1&2|3' # precedence - and is higher |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
345 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
346 (list |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
347 (and |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
348 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
349 (symbol '2')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
350 (symbol '3'))) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
351 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
352 <addset |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
353 <baseset []>, |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
354 <baseset [3]>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
355 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
356 $ try '1|2&3' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
357 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
358 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
359 (symbol '1') |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
360 (and |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
361 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
362 (symbol '3')))) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
363 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
364 <addset |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
365 <baseset [1]>, |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
366 <baseset []>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
367 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
368 $ try '1&2&3' # associativity |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
369 (and |
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
370 (and |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
371 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
372 (symbol '2')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
373 (symbol '3')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
374 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
375 <baseset []> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
376 $ try '1|(2|3)' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
377 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
378 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
379 (symbol '1') |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
380 (group |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
381 (or |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
382 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
383 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
384 (symbol '3')))))) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
385 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
386 <addset |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
387 <baseset [1]>, |
25343
7fbef7932af9
revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents:
25309
diff
changeset
|
388 <baseset [2, 3]>> |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
389 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
390 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
391 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
392 $ log '1.0' # tag |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
393 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
394 $ log 'a' # branch |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
395 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
396 $ log '2785f51ee' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
397 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
398 $ log 'date(2005)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
399 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
400 $ log 'date(this is a test)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
401 hg: parse error at 10: unexpected token: symbol |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
402 (date(this is a test) |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
403 ^ here) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
404 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
405 $ log 'date()' |
12736
7e14e67e6622
revset: use 'requires' instead of 'wants' in error message
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
12716
diff
changeset
|
406 hg: parse error: date requires a string |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
407 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
408 $ log 'date' |
24932
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
409 abort: unknown revision 'date'! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
410 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
411 $ log 'date(' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
412 hg: parse error at 5: not a prefix: end |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
413 (date( |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
414 ^ here) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
415 [255] |
26232
43f9976346e9
revset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org>
parents:
26061
diff
changeset
|
416 $ log 'date("\xy")' |
36583
edf736c3c064
tests: add some re and globs for test-revset on python3
Augie Fackler <augie@google.com>
parents:
36582
diff
changeset
|
417 hg: parse error: invalid \x escape* (glob) |
26232
43f9976346e9
revset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org>
parents:
26061
diff
changeset
|
418 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
419 $ log 'date(tip)' |
32462
bb18728ea617
util: raise ParseError when parsing dates (BC)
Boris Feld <boris.feld@octobus.net>
parents:
32442
diff
changeset
|
420 hg: parse error: invalid date: 'tip' |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
421 [255] |
24932
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
422 $ log '0:date' |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
423 abort: unknown revision 'date'! |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
424 [255] |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
425 $ log '::"date"' |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
426 abort: unknown revision 'date'! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12105
diff
changeset
|
427 [255] |
24932
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
428 $ hg book date -r 4 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
429 $ log '0:date' |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
430 0 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
431 1 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
432 2 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
433 3 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
434 4 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
435 $ log '::date' |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
436 0 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
437 1 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
438 2 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
439 4 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
440 $ log '::"date"' |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
441 0 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
442 1 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
443 2 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
444 4 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
445 $ log 'date(2005) and 1::' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
446 4 |
24932
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
447 $ hg book -d date |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
448 |
29441
9e8d258708bb
revset: check invalid function syntax "func-name"() explicitly
Yuya Nishihara <yuya@tcha.org>
parents:
29408
diff
changeset
|
449 function name should be a symbol |
9e8d258708bb
revset: check invalid function syntax "func-name"() explicitly
Yuya Nishihara <yuya@tcha.org>
parents:
29408
diff
changeset
|
450 |
9e8d258708bb
revset: check invalid function syntax "func-name"() explicitly
Yuya Nishihara <yuya@tcha.org>
parents:
29408
diff
changeset
|
451 $ log '"date"(2005)' |
9e8d258708bb
revset: check invalid function syntax "func-name"() explicitly
Yuya Nishihara <yuya@tcha.org>
parents:
29408
diff
changeset
|
452 hg: parse error: not a symbol |
9e8d258708bb
revset: check invalid function syntax "func-name"() explicitly
Yuya Nishihara <yuya@tcha.org>
parents:
29408
diff
changeset
|
453 [255] |
9e8d258708bb
revset: check invalid function syntax "func-name"() explicitly
Yuya Nishihara <yuya@tcha.org>
parents:
29408
diff
changeset
|
454 |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
455 keyword arguments |
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
456 |
25706
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
457 $ log 'extra(branch, value=a)' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
458 0 |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
459 |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
460 $ log 'extra(branch, a, b)' |
31920
a98540ea1e42
parser: verify excessive number of args excluding kwargs in buildargsdict()
Yuya Nishihara <yuya@tcha.org>
parents:
31800
diff
changeset
|
461 hg: parse error: extra takes at most 2 positional arguments |
25706
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
462 [255] |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
463 $ log 'extra(a, label=b)' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
464 hg: parse error: extra got multiple values for keyword argument 'label' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
465 [255] |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
466 $ log 'extra(label=branch, default)' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
467 hg: parse error: extra got an invalid argument |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
468 [255] |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
469 $ log 'extra(branch, foo+bar=baz)' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
470 hg: parse error: extra got an invalid argument |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
471 [255] |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
472 $ log 'extra(unknown=branch)' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
473 hg: parse error: extra got an unexpected keyword argument 'unknown' |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
474 [255] |
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
475 |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
476 $ try 'foo=bar|baz' |
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
477 (keyvalue |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
478 (symbol 'foo') |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
479 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
480 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
481 (symbol 'bar') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
482 (symbol 'baz')))) |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
483 hg: parse error: can't use a key-value pair in this context |
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
484 [255] |
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
485 |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
486 right-hand side should be optimized recursively |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
487 |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
488 $ try --optimize 'foo=(not public())' |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
489 (keyvalue |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
490 (symbol 'foo') |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
491 (group |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
492 (not |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
493 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
494 (symbol 'public') |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
495 None)))) |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
496 * optimized: |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
497 (keyvalue |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
498 (symbol 'foo') |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
499 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
500 (symbol '_notpublic') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
501 None)) |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
502 hg: parse error: can't use a key-value pair in this context |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
503 [255] |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
504 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
505 relation-subscript operator has the highest binding strength (as function call): |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
506 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
507 $ hg debugrevspec -p parsed 'tip:tip^#generations[-1]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
508 * parsed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
509 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
510 (symbol 'tip') |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
511 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
512 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
513 (symbol 'tip')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
514 (symbol 'generations') |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
515 (negate |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
516 (symbol '1')))) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
517 9 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
518 8 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
519 7 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
520 6 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
521 5 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
522 4 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
523 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
524 $ hg debugrevspec -p parsed --no-show-revs 'not public()#generations[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
525 * parsed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
526 (not |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
527 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
528 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
529 (symbol 'public') |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
530 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
531 (symbol 'generations') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
532 (symbol '0'))) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
533 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
534 left-hand side of relation-subscript operator should be optimized recursively: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
535 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
536 $ hg debugrevspec -p analyzed -p optimized --no-show-revs \ |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
537 > '(not public())#generations[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
538 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
539 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
540 (not |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
541 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
542 (symbol 'public') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
543 None)) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
544 (symbol 'generations') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
545 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
546 * optimized: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
547 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
548 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
549 (symbol '_notpublic') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
550 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
551 (symbol 'generations') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
552 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
553 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
554 resolution of subscript and relation-subscript ternary operators: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
555 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
556 $ hg debugrevspec -p analyzed 'tip[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
557 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
558 (subscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
559 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
560 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
561 hg: parse error: can't use a subscript in this context |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
562 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
563 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
564 $ hg debugrevspec -p analyzed 'tip#rel[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
565 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
566 (relsubscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
567 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
568 (symbol 'rel') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
569 (symbol '0')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
570 hg: parse error: unknown identifier: rel |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
571 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
572 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
573 $ hg debugrevspec -p analyzed '(tip#rel)[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
574 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
575 (subscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
576 (relation |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
577 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
578 (symbol 'rel')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
579 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
580 hg: parse error: can't use a subscript in this context |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
581 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
582 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
583 $ hg debugrevspec -p analyzed 'tip#rel[0][1]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
584 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
585 (subscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
586 (relsubscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
587 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
588 (symbol 'rel') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
589 (symbol '0')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
590 (symbol '1')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
591 hg: parse error: can't use a subscript in this context |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
592 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
593 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
594 $ hg debugrevspec -p analyzed 'tip#rel0#rel1[1]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
595 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
596 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
597 (relation |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
598 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
599 (symbol 'rel0')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
600 (symbol 'rel1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
601 (symbol '1')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
602 hg: parse error: unknown identifier: rel1 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
603 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
604 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
605 $ hg debugrevspec -p analyzed 'tip#rel0[0]#rel1[1]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
606 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
607 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
608 (relsubscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
609 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
610 (symbol 'rel0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
611 (symbol '0')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
612 (symbol 'rel1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
613 (symbol '1')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
614 hg: parse error: unknown identifier: rel1 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
615 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
616 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
617 parse errors of relation, subscript and relation-subscript operators: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
618 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
619 $ hg debugrevspec '[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
620 hg: parse error at 0: not a prefix: [ |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
621 ([0] |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
622 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
623 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
624 $ hg debugrevspec '.#' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
625 hg: parse error at 2: not a prefix: end |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
626 (.# |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
627 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
628 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
629 $ hg debugrevspec '#rel' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
630 hg: parse error at 0: not a prefix: # |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
631 (#rel |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
632 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
633 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
634 $ hg debugrevspec '.#rel[0' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
635 hg: parse error at 7: unexpected token: end |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
636 (.#rel[0 |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
637 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
638 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
639 $ hg debugrevspec '.]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
640 hg: parse error at 1: invalid token |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
641 (.] |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
642 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
643 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
644 |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
645 $ hg debugrevspec '.#generations[a]' |
41563
13f7a6a4f0db
revset: leverage getintrange() helper in relation-subscript operation (API)
Yuya Nishihara <yuya@tcha.org>
parents:
41387
diff
changeset
|
646 hg: parse error: relation subscript must be an integer or a range |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
647 [255] |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
648 $ hg debugrevspec '.#generations[1-2]' |
41563
13f7a6a4f0db
revset: leverage getintrange() helper in relation-subscript operation (API)
Yuya Nishihara <yuya@tcha.org>
parents:
41387
diff
changeset
|
649 hg: parse error: relation subscript must be an integer or a range |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
650 [255] |
41359
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
651 $ hg debugrevspec '.#generations[foo:bar]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
652 hg: parse error: relation subscript bounds must be integers |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
653 [255] |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
654 |
40931
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
655 suggested relations |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
656 |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
657 $ hg debugrevspec '.#generafions[0]' |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
658 hg: parse error: unknown identifier: generafions |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
659 (did you mean generations?) |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
660 [255] |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
661 |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
662 $ hg debugrevspec '.#f[0]' |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
663 hg: parse error: unknown identifier: f |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
664 [255] |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
665 |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
666 parsed tree at stages: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
667 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
668 $ hg debugrevspec -p all '()' |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
669 * parsed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
670 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
671 None) |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
672 * expanded: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
673 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
674 None) |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
675 * concatenated: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
676 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
677 None) |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
678 * analyzed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
679 None |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
680 * optimized: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
681 None |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
682 hg: parse error: missing argument |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
683 [255] |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
684 |
29923
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
685 $ hg debugrevspec --no-optimized -p all '()' |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
686 * parsed: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
687 (group |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
688 None) |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
689 * expanded: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
690 (group |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
691 None) |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
692 * concatenated: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
693 (group |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
694 None) |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
695 * analyzed: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
696 None |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
697 hg: parse error: missing argument |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
698 [255] |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
699 |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
700 $ hg debugrevspec -p parsed -p analyzed -p optimized '(0|1)-1' |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
701 * parsed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
702 (minus |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
703 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
704 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
705 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
706 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
707 (symbol '1')))) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
708 (symbol '1')) |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
709 * analyzed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
710 (and |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
711 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
712 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
713 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
714 (symbol '1'))) |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
715 (not |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
716 (symbol '1'))) |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
717 * optimized: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
718 (difference |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
719 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
720 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
721 (string '0\x001')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
722 (symbol '1')) |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
723 0 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
724 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
725 $ hg debugrevspec -p unknown '0' |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
726 abort: invalid stage name: unknown |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
727 [255] |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
728 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
729 $ hg debugrevspec -p all --optimize '0' |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
730 abort: cannot use --optimize with --show-stage |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
731 [255] |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
732 |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
733 verify optimized tree: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
734 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
735 $ hg debugrevspec --verify '0|1' |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
736 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
737 $ hg debugrevspec --verify -v -p analyzed -p optimized 'r3232() & 2' |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
738 * analyzed: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
739 (and |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
740 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
741 (symbol 'r3232') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
742 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
743 (symbol '2')) |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
744 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
745 (andsmally |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
746 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
747 (symbol 'r3232') |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
748 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
749 (symbol '2')) |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
750 * analyzed set: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
751 <baseset [2]> |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
752 * optimized set: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
753 <baseset [2, 2]> |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
754 --- analyzed |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
755 +++ optimized |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
756 2 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
757 +2 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
758 [1] |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
759 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
760 $ hg debugrevspec --no-optimized --verify-optimized '0' |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
761 abort: cannot use --verify-optimized with --no-optimized |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
762 [255] |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
763 |
24932
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
764 Test that symbols only get parsed as functions if there's an opening |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
765 parenthesis. |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
766 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
767 $ hg book only -r 9 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
768 $ log 'only(only)' # Outer "only" is a function, inner "only" is the bookmark |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
769 8 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
770 9 |
11419 | 771 |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
772 ':y' behaves like '0:y', but can't be rewritten as such since the revision '0' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
773 may be hidden (issue5385) |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
774 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
775 $ try -p parsed -p analyzed ':' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
776 * parsed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
777 (rangeall |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
778 None) |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
779 * analyzed: |
30803
d389f19f14aa
revset: do not transform range* operators in parsed tree
Yuya Nishihara <yuya@tcha.org>
parents:
30783
diff
changeset
|
780 (rangeall |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
781 None) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
782 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
783 <spanset+ 0:10> |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
784 0 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
785 1 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
786 2 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
787 3 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
788 4 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
789 5 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
790 6 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
791 7 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
792 8 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
793 9 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
794 $ try -p analyzed ':1' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
795 * analyzed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
796 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
797 (symbol '1')) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
798 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
799 <spanset+ 0:2> |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
800 0 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
801 1 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
802 $ try -p analyzed ':(1|2)' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
803 * analyzed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
804 (rangepre |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
805 (or |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
806 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
807 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
808 (symbol '2')))) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
809 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
810 <spanset+ 0:3> |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
811 0 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
812 1 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
813 2 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
814 $ try -p analyzed ':(1&2)' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
815 * analyzed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
816 (rangepre |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
817 (and |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
818 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
819 (symbol '2'))) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
820 * set: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
821 <baseset []> |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
822 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
823 infix/suffix resolution of ^ operator (issue2884, issue5764): |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
824 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
825 x^:y means (x^):y |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
826 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
827 $ try '1^:2' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
828 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
829 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
830 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
831 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
832 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
833 <spanset+ 0:3> |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
834 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
835 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
836 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
837 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
838 $ try '1^::2' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
839 (dagrange |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
840 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
841 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
842 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
843 * set: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
844 <baseset+ [0, 1, 2]> |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
845 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
846 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
847 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
848 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
849 $ try '1^..2' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
850 (dagrange |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
851 (parentpost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
852 (symbol '1')) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
853 (symbol '2')) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
854 * set: |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
855 <baseset+ [0, 1, 2]> |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
856 0 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
857 1 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
858 2 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
859 |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
860 $ try '9^:' |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
861 (rangepost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
862 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
863 (symbol '9'))) |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
864 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
865 <spanset+ 8:10> |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
866 8 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
867 9 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
868 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
869 $ try '9^::' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
870 (dagrangepost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
871 (parentpost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
872 (symbol '9'))) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
873 * set: |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
874 <generatorsetasc+> |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
875 8 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
876 9 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
877 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
878 $ try '9^..' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
879 (dagrangepost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
880 (parentpost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
881 (symbol '9'))) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
882 * set: |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
883 <generatorsetasc+> |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
884 8 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
885 9 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
886 |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
887 x^:y should be resolved before omitting group operators |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
888 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
889 $ try '1^(:2)' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
890 (parent |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
891 (symbol '1') |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
892 (group |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
893 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
894 (symbol '2')))) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
895 hg: parse error: ^ expects a number 0, 1, or 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
896 [255] |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
897 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
898 x^:y should be resolved recursively |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
899 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
900 $ try 'sort(1^:2)' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
901 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
902 (symbol 'sort') |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
903 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
904 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
905 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
906 (symbol '2'))) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
907 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
908 <spanset+ 0:3> |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
909 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
910 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
911 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
912 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
913 $ try '(3^:4)^:2' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
914 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
915 (parentpost |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
916 (group |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
917 (range |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
918 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
919 (symbol '3')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
920 (symbol '4')))) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
921 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
922 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
923 <spanset+ 0:3> |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
924 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
925 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
926 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
927 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
928 $ try '(3^::4)^::2' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
929 (dagrange |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
930 (parentpost |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
931 (group |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
932 (dagrange |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
933 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
934 (symbol '3')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
935 (symbol '4')))) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
936 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
937 * set: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
938 <baseset+ [0, 1, 2]> |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
939 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
940 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
941 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
942 |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
943 $ try '(9^:)^:' |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
944 (rangepost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
945 (parentpost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
946 (group |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
947 (rangepost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
948 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
949 (symbol '9')))))) |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
950 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
951 <spanset+ 4:10> |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
952 4 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
953 5 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
954 6 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
955 7 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
956 8 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
957 9 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
958 |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
959 x^ in alias should also be resolved |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
960 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
961 $ try 'A' --config 'revsetalias.A=1^:2' |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
962 (symbol 'A') |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
963 * expanded: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
964 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
965 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
966 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
967 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
968 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
969 <spanset+ 0:3> |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
970 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
971 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
972 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
973 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
974 $ try 'A:2' --config 'revsetalias.A=1^' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
975 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
976 (symbol 'A') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
977 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
978 * expanded: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
979 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
980 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
981 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
982 (symbol '2')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
983 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
984 <spanset+ 0:3> |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
985 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
986 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
987 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
988 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
989 but not beyond the boundary of alias expansion, because the resolution should |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
990 be made at the parsing stage |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
991 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
992 $ try '1^A' --config 'revsetalias.A=:2' |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
993 (parent |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
994 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
995 (symbol 'A')) |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
996 * expanded: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
997 (parent |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
998 (symbol '1') |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
999 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1000 (symbol '2'))) |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
1001 hg: parse error: ^ expects a number 0, 1, or 2 |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
1002 [255] |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
1003 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1004 '::' itself isn't a valid expression |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1005 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1006 $ try '::' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1007 (dagrangeall |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1008 None) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1009 hg: parse error: can't use '::' in this context |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1010 [255] |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1011 |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1012 ancestor can accept 0 or more arguments |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1013 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1014 $ log 'ancestor()' |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1015 $ log 'ancestor(1)' |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1016 1 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1017 $ log 'ancestor(4,5)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1018 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1019 $ log 'ancestor(4,5) and 4' |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1020 $ log 'ancestor(0,0,1,3)' |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1021 0 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1022 $ log 'ancestor(3,1,5,3,5,1)' |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1023 1 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1024 $ log 'ancestor(0,1,3,5)' |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1025 0 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1026 $ log 'ancestor(1,2,3,4,5)' |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1027 1 |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1028 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1029 test ancestors |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1030 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1031 $ hg log -G -T '{rev}\n' --config experimental.graphshorten=True |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1032 @ 9 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1033 o 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1034 | o 7 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1035 | o 6 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1036 |/| |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1037 | o 5 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1038 o | 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1039 | o 3 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1040 o | 2 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1041 |/ |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1042 o 1 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1043 o 0 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1044 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1045 $ log 'ancestors(5)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1046 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1047 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1048 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1049 5 |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1050 $ log 'ancestor(ancestors(5))' |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1051 0 |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1052 $ log '::r3232()' |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1053 0 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1054 1 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1055 2 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1056 3 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1057 |
38624
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1058 test common ancestors |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1059 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1060 $ hg log -T '{rev}\n' -r 'commonancestors(7 + 9)' |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1061 0 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1062 1 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1063 2 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1064 4 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1065 |
39799
f28812c708a5
revset: fix commonancestor test so it demonstrates correct behavior
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
38705
diff
changeset
|
1066 $ hg log -T '{rev}\n' -r 'commonancestors(heads(all()))' |
38624
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1067 0 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1068 1 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1069 2 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1070 4 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1071 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1072 $ hg log -T '{rev}\n' -r 'commonancestors(9)' |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1073 0 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1074 1 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1075 2 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1076 4 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1077 8 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1078 9 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1079 |
39800
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1080 $ hg log -T '{rev}\n' -r 'commonancestors(8 + 9)' |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1081 0 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1082 1 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1083 2 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1084 4 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1085 8 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1086 |
39804
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1087 test the specialized implementation of heads(commonancestors(..)) |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1088 (2 gcas is tested in test-merge-criss-cross.t) |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1089 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1090 $ hg log -T '{rev}\n' -r 'heads(commonancestors(7 + 9))' |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1091 4 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1092 $ hg log -T '{rev}\n' -r 'heads(commonancestors(heads(all())))' |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1093 4 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1094 $ hg log -T '{rev}\n' -r 'heads(commonancestors(9))' |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1095 9 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1096 $ hg log -T '{rev}\n' -r 'heads(commonancestors(8 + 9))' |
39805
823f34acfd46
revset: make heads(commonancestors(x + x^)) be x^, not x
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39804
diff
changeset
|
1097 8 |
39804
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1098 |
38705
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1099 test ancestor variants of empty revision |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1100 |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1101 $ log 'ancestor(none())' |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1102 $ log 'ancestors(none())' |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1103 $ log 'commonancestors(none())' |
39804
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1104 $ log 'heads(commonancestors(none()))' |
38705
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1105 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1106 test ancestors with depth limit |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1107 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1108 (depth=0 selects the node itself) |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1109 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1110 $ log 'reverse(ancestors(9, depth=0))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1111 9 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1112 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1113 (interleaved: '4' would be missing if heap queue were higher depth first) |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1114 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1115 $ log 'reverse(ancestors(8:9, depth=1))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1116 9 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1117 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1118 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1119 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1120 (interleaved: '2' would be missing if heap queue were higher depth first) |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1121 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1122 $ log 'reverse(ancestors(7+8, depth=2))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1123 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1124 7 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1125 6 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1126 5 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1127 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1128 2 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1129 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1130 (walk example above by separate queries) |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1131 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1132 $ log 'reverse(ancestors(8, depth=2)) + reverse(ancestors(7, depth=2))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1133 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1134 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1135 2 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1136 7 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1137 6 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1138 5 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1139 |
33003
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1140 (walk 2nd and 3rd ancestors) |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1141 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1142 $ log 'reverse(ancestors(7, depth=3, startdepth=2))' |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1143 5 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1144 4 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1145 3 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1146 2 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1147 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1148 (interleaved: '4' would be missing if higher-depth ancestors weren't scanned) |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1149 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1150 $ log 'reverse(ancestors(7+8, depth=2, startdepth=2))' |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1151 5 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1152 4 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1153 2 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1154 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1155 (note that 'ancestors(x, depth=y, startdepth=z)' does not identical to |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1156 'ancestors(x, depth=y) - ancestors(x, depth=z-1)' because a node may have |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1157 multiple depths) |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1158 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1159 $ log 'reverse(ancestors(7+8, depth=2) - ancestors(7+8, depth=1))' |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1160 5 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1161 2 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1162 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1163 test bad arguments passed to ancestors() |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1164 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1165 $ log 'ancestors(., depth=-1)' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1166 hg: parse error: negative depth |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1167 [255] |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1168 $ log 'ancestors(., depth=foo)' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1169 hg: parse error: ancestors expects an integer depth |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1170 [255] |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1171 |
33074
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1172 test descendants |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1173 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1174 $ hg log -G -T '{rev}\n' --config experimental.graphshorten=True |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1175 @ 9 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1176 o 8 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1177 | o 7 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1178 | o 6 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1179 |/| |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1180 | o 5 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1181 o | 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1182 | o 3 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1183 o | 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1184 |/ |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1185 o 1 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1186 o 0 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1187 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1188 (null is ultimate root and has optimized path) |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1189 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1190 $ log 'null:4 & descendants(null)' |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1191 -1 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1192 0 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1193 1 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1194 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1195 3 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1196 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1197 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1198 (including merge) |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1199 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1200 $ log ':8 & descendants(2)' |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1201 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1202 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1203 6 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1204 7 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1205 8 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1206 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1207 (multiple roots) |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1208 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1209 $ log ':8 & descendants(2+5)' |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1210 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1211 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1212 5 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1213 6 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1214 7 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1215 8 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1216 |
33080
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1217 test descendants with depth limit |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1218 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1219 (depth=0 selects the node itself) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1220 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1221 $ log 'descendants(0, depth=0)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1222 0 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1223 $ log 'null: & descendants(null, depth=0)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1224 -1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1225 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1226 (p2 = null should be ignored) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1227 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1228 $ log 'null: & descendants(null, depth=2)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1229 -1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1230 0 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1231 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1232 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1233 (multiple paths: depth(6) = (2, 3)) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1234 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1235 $ log 'descendants(1+3, depth=2)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1236 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1237 2 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1238 3 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1239 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1240 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1241 6 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1242 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1243 (multiple paths: depth(5) = (1, 2), depth(6) = (2, 3)) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1244 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1245 $ log 'descendants(3+1, depth=2, startdepth=2)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1246 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1247 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1248 6 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1249 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1250 (multiple depths: depth(6) = (0, 2, 4), search for depth=2) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1251 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1252 $ log 'descendants(0+3+6, depth=3, startdepth=1)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1253 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1254 2 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1255 3 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1256 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1257 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1258 6 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1259 7 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1260 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1261 (multiple depths: depth(6) = (0, 4), no match) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1262 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1263 $ log 'descendants(0+6, depth=3, startdepth=1)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1264 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1265 2 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1266 3 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1267 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1268 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1269 7 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1270 |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1271 test ancestors/descendants relation subscript: |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1272 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1273 $ log 'tip#generations[0]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1274 9 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1275 $ log '.#generations[-1]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1276 8 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1277 $ log '.#g[(-1)]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1278 8 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1279 |
41359
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1280 $ log '6#generations[0:1]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1281 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1282 7 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1283 $ log '6#generations[-1:1]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1284 4 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1285 5 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1286 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1287 7 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1288 $ log '6#generations[0:]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1289 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1290 7 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1291 $ log '5#generations[:0]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1292 0 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1293 1 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1294 3 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1295 5 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1296 $ log '3#generations[:]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1297 0 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1298 1 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1299 3 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1300 5 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1301 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1302 7 |
41387
947b81560583
test-revset: check that #generations[1:-1] doesn't result in any errors
Anton Shestakov <av6@dwimlabs.net>
parents:
41359
diff
changeset
|
1303 $ log 'tip#generations[1:-1]' |
41359
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1304 |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1305 $ hg debugrevspec -p parsed 'roots(:)#g[2]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1306 * parsed: |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1307 (relsubscript |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1308 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1309 (symbol 'roots') |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1310 (rangeall |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1311 None)) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1312 (symbol 'g') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1313 (symbol '2')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1314 2 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1315 3 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1316 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1317 test author |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1318 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1319 $ log 'author(bob)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1320 2 |
16823
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1321 $ log 'author("re:bob|test")' |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1322 0 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1323 1 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1324 2 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1325 3 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1326 4 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1327 5 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1328 6 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1329 7 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1330 8 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1331 9 |
30782
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1332 $ log 'author(r"re:\S")' |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1333 0 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1334 1 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1335 2 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1336 3 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1337 4 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1338 5 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1339 6 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1340 7 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1341 8 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1342 9 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1343 $ log 'branch(é)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1344 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1345 9 |
16821
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1346 $ log 'branch(a)' |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1347 0 |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1348 $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n' |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1349 0 a |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1350 2 a-b-c- |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1351 3 +a+b+c+ |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1352 4 -a-b-c- |
16851
c739227b5eea
test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16824
diff
changeset
|
1353 5 !a/b/c/ |
16821
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1354 6 _a_b_c_ |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1355 7 .a.b.c. |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1356 $ log 'children(ancestor(4,5))' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1357 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1358 3 |
30699
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1359 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1360 $ log 'children(4)' |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1361 6 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1362 8 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1363 $ log 'children(null)' |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1364 0 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1365 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1366 $ log 'closed()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1367 $ log 'contains(a)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1368 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1369 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1370 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1371 5 |
20286
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1372 $ log 'contains("../repo/a")' |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1373 0 |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1374 1 |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1375 3 |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1376 5 |
14650
93731b3efd0d
revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents:
14153
diff
changeset
|
1377 $ log 'desc(B)' |
93731b3efd0d
revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents:
14153
diff
changeset
|
1378 5 |
30783
931a60880df4
revset: add regular expression support to 'desc'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30782
diff
changeset
|
1379 $ hg log -r 'desc(r"re:S?u")' --template "{rev} {desc|firstline}\n" |
931a60880df4
revset: add regular expression support to 'desc'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30782
diff
changeset
|
1380 5 5 bug |
931a60880df4
revset: add regular expression support to 'desc'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30782
diff
changeset
|
1381 6 6 issue619 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1382 $ log 'descendants(2 or 3)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1383 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1384 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1385 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1386 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1387 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1388 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1389 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1390 9 |
16411
4c2edcd84175
graphlog: correctly handle calls in subdirectories
Patrick Mezard <patrick@mezard.eu>
parents:
16218
diff
changeset
|
1391 $ log 'file("b*")' |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1392 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1393 4 |
20288
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1394 $ log 'filelog("b")' |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1395 1 |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1396 4 |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1397 $ log 'filelog("../repo/b")' |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1398 1 |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1399 4 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1400 $ log 'follow()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1401 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1402 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1403 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1404 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1405 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1406 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1407 $ log 'grep("issue\d+")' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1408 6 |
12321 | 1409 $ try 'grep("(")' # invalid regular expression |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
1410 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1411 (symbol 'grep') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1412 (string '(')) |
36583
edf736c3c064
tests: add some re and globs for test-revset on python3
Augie Fackler <augie@google.com>
parents:
36582
diff
changeset
|
1413 hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \),.*) (re) |
12321 | 1414 [255] |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1415 $ try 'grep("\bissue\d+")' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
1416 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1417 (symbol 'grep') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1418 (string '\x08issue\\d+')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1419 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1420 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1421 <fullreposet+ 0:10>, |
28424
534f968d33e5
revset: add inspection data to all filter() calls
Yuya Nishihara <yuya@tcha.org>
parents:
28423
diff
changeset
|
1422 <grep '\x08issue\\d+'>> |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1423 $ try 'grep(r"\bissue\d+")' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
1424 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1425 (symbol 'grep') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1426 (string '\\bissue\\d+')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1427 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1428 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1429 <fullreposet+ 0:10>, |
28424
534f968d33e5
revset: add inspection data to all filter() calls
Yuya Nishihara <yuya@tcha.org>
parents:
28423
diff
changeset
|
1430 <grep '\\bissue\\d+'>> |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1431 6 |
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1432 $ try 'grep(r"\")' |
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1433 hg: parse error at 7: unterminated string |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
1434 (grep(r"\") |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
1435 ^ here) |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1436 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1437 $ log 'head()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1438 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1439 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1440 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1441 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1442 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1443 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1444 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1445 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1446 9 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1447 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1448 Test heads |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1449 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1450 $ log 'heads(6::)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1451 7 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1452 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1453 heads() can be computed in subset '9:' |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1454 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1455 $ hg debugrevspec -s '9: & heads(all())' |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1456 * set: |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1457 <filteredset |
41274
4c6fdc7e2e7d
revset: inline parents computation to reuse the input argument
Boris Feld <boris.feld@octobus.net>
parents:
40931
diff
changeset
|
1458 <baseset [9]>, |
41276
5affe1583e1d
revset: use changelog's `headrevs` method to compute heads
Boris Feld <boris.feld@octobus.net>
parents:
41274
diff
changeset
|
1459 <baseset+ [7, 9]>> |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1460 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1461 |
38479
72621094505f
revset: fix heads() order to always follow the input set (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
38478
diff
changeset
|
1462 but should follow the order of the subset |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1463 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1464 $ log 'heads(all())' |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1465 7 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1466 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1467 $ log 'heads(tip:0)' |
38479
72621094505f
revset: fix heads() order to always follow the input set (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
38478
diff
changeset
|
1468 7 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1469 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1470 $ log 'tip:0 & heads(all())' |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1471 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1472 7 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1473 $ log 'tip:0 & heads(0:tip)' |
38479
72621094505f
revset: fix heads() order to always follow the input set (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
38478
diff
changeset
|
1474 9 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1475 7 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1476 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1477 $ log 'keyword(issue)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1478 6 |
19706
26ddce1a2a55
revset: fix wrong keyword() behaviour for strings with spaces
Alexander Plavin <alexander@plav.in>
parents:
18955
diff
changeset
|
1479 $ log 'keyword("test a")' |
32798
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1480 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1481 Test first (=limit) and last |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1482 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1483 $ log 'limit(head(), 1)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1484 0 |
26638
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1485 $ log 'limit(author("re:bob|test"), 3, 5)' |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1486 5 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1487 6 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1488 7 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1489 $ log 'limit(author("re:bob|test"), offset=6)' |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1490 6 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1491 $ log 'limit(author("re:bob|test"), offset=10)' |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1492 $ log 'limit(all(), 1, -1)' |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1493 hg: parse error: negative offset |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1494 [255] |
32799
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1495 $ log 'limit(all(), -1)' |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1496 hg: parse error: negative number to select |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1497 [255] |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1498 $ log 'limit(all(), 0)' |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1499 |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1500 $ log 'last(all(), -1)' |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1501 hg: parse error: negative number to select |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1502 [255] |
32798
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1503 $ log 'last(all(), 0)' |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1504 $ log 'last(all(), 1)' |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1505 9 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1506 $ log 'last(all(), 2)' |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1507 8 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1508 9 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1509 |
32819
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1510 Test smartset.slice() by first/last() |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1511 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1512 (using unoptimized set, filteredset as example) |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1513 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1514 $ hg debugrevspec --no-show-revs -s '0:7 & branch("re:")' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1515 * set: |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1516 <filteredset |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1517 <spanset+ 0:8>, |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1518 <branch 're:'>> |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1519 $ log 'limit(0:7 & branch("re:"), 3, 4)' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1520 4 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1521 5 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1522 6 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1523 $ log 'limit(7:0 & branch("re:"), 3, 4)' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1524 3 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1525 2 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1526 1 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1527 $ log 'last(0:7 & branch("re:"), 2)' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1528 6 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1529 7 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1530 |
32820
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1531 (using baseset) |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1532 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1533 $ hg debugrevspec --no-show-revs -s 0+1+2+3+4+5+6+7 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1534 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1535 <baseset [0, 1, 2, 3, 4, 5, 6, 7]> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1536 $ hg debugrevspec --no-show-revs -s 0::7 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1537 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1538 <baseset+ [0, 1, 2, 3, 4, 5, 6, 7]> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1539 $ log 'limit(0+1+2+3+4+5+6+7, 3, 4)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1540 4 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1541 5 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1542 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1543 $ log 'limit(sort(0::7, rev), 3, 4)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1544 4 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1545 5 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1546 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1547 $ log 'limit(sort(0::7, -rev), 3, 4)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1548 3 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1549 2 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1550 1 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1551 $ log 'last(sort(0::7, rev), 2)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1552 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1553 7 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1554 $ hg debugrevspec -s 'limit(sort(0::7, rev), 3, 6)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1555 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1556 <baseset+ [6, 7]> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1557 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1558 7 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1559 $ hg debugrevspec -s 'limit(sort(0::7, rev), 3, 9)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1560 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1561 <baseset+ []> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1562 $ hg debugrevspec -s 'limit(sort(0::7, -rev), 3, 6)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1563 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1564 <baseset- [0, 1]> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1565 1 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1566 0 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1567 $ hg debugrevspec -s 'limit(sort(0::7, -rev), 3, 9)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1568 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1569 <baseset- []> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1570 $ hg debugrevspec -s 'limit(0::7, 0)' |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1571 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1572 <baseset+ []> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1573 |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1574 (using spanset) |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1575 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1576 $ hg debugrevspec --no-show-revs -s 0:7 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1577 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1578 <spanset+ 0:8> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1579 $ log 'limit(0:7, 3, 4)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1580 4 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1581 5 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1582 6 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1583 $ log 'limit(7:0, 3, 4)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1584 3 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1585 2 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1586 1 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1587 $ log 'limit(0:7, 3, 6)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1588 6 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1589 7 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1590 $ log 'limit(7:0, 3, 6)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1591 1 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1592 0 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1593 $ log 'last(0:7, 2)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1594 6 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1595 7 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1596 $ hg debugrevspec -s 'limit(0:7, 3, 6)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1597 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1598 <spanset+ 6:8> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1599 6 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1600 7 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1601 $ hg debugrevspec -s 'limit(0:7, 3, 9)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1602 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1603 <spanset+ 8:8> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1604 $ hg debugrevspec -s 'limit(7:0, 3, 6)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1605 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1606 <spanset- 0:2> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1607 1 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1608 0 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1609 $ hg debugrevspec -s 'limit(7:0, 3, 9)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1610 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1611 <spanset- 0:0> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1612 $ hg debugrevspec -s 'limit(0:7, 0)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1613 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1614 <spanset+ 0:0> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1615 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1616 Test order of first/last revisions |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1617 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1618 $ hg debugrevspec -s 'first(4:0, 3) & 3:' |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1619 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1620 <filteredset |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1621 <spanset- 2:5>, |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1622 <spanset+ 3:10>> |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1623 4 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1624 3 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1625 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1626 $ hg debugrevspec -s '3: & first(4:0, 3)' |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1627 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1628 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1629 <spanset+ 3:10>, |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1630 <spanset- 2:5>> |
32801
348b491c0934
revset: fix order of first/last members in compound expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32800
diff
changeset
|
1631 3 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1632 4 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1633 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1634 $ hg debugrevspec -s 'last(4:0, 3) & :1' |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1635 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1636 <filteredset |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1637 <spanset- 0:3>, |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1638 <spanset+ 0:2>> |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1639 1 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1640 0 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1641 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1642 $ hg debugrevspec -s ':1 & last(4:0, 3)' |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1643 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1644 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1645 <spanset+ 0:2>, |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1646 <spanset+ 0:3>> |
32801
348b491c0934
revset: fix order of first/last members in compound expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32800
diff
changeset
|
1647 0 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1648 1 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1649 |
33109
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1650 Test scmutil.revsingle() should return the last revision |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1651 |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1652 $ hg debugrevspec -s 'last(0::)' |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1653 * set: |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1654 <baseset slice=0:1 |
35501
12a46ad67a3c
smartset: split generatorset classes to avoid cycle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34866
diff
changeset
|
1655 <generatorsetasc->> |
33109
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1656 9 |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1657 $ hg identify -r '0::' --num |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1658 9 |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1659 |
32798
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1660 Test matching |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1661 |
16447
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1662 $ log 'matching(6)' |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1663 6 |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1664 $ log 'matching(6:7, "phase parents user date branch summary files description substate")' |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1665 6 |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1666 7 |
20863
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1667 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1668 Testing min and max |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1669 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1670 max: simple |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1671 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1672 $ log 'max(contains(a))' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1673 5 |
20863
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1674 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1675 max: simple on unordered set) |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1676 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1677 $ log 'max((4+0+2+5+7) and contains(a))' |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1678 5 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1679 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1680 max: no result |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1681 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1682 $ log 'max(contains(stringthatdoesnotappearanywhere))' |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1683 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1684 max: no result on unordered set |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1685 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1686 $ log 'max((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))' |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1687 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1688 min: simple |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1689 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1690 $ log 'min(contains(a))' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1691 0 |
20863
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1692 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1693 min: simple on unordered set |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1694 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1695 $ log 'min((4+0+2+5+7) and contains(a))' |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1696 0 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1697 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1698 min: empty |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1699 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1700 $ log 'min(contains(stringthatdoesnotappearanywhere))' |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1701 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1702 min: empty on unordered set |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1703 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1704 $ log 'min((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))' |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1705 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1706 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1707 $ log 'merge()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1708 6 |
17753
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
1709 $ log 'branchpoint()' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
1710 1 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
1711 4 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1712 $ log 'modifies(b)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1713 4 |
16521
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1714 $ log 'modifies("path:b")' |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1715 4 |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1716 $ log 'modifies("*")' |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1717 4 |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1718 6 |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1719 $ log 'modifies("set:modified()")' |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1720 4 |
12716
c7e619e30ba3
revset: add id() and rev() to allow explicitly referring to changes by hash or rev
Augie Fackler <durin42@gmail.com>
parents:
12715
diff
changeset
|
1721 $ log 'id(5)' |
c7e619e30ba3
revset: add id() and rev() to allow explicitly referring to changes by hash or rev
Augie Fackler <durin42@gmail.com>
parents:
12715
diff
changeset
|
1722 2 |
20613 | 1723 $ log 'only(9)' |
1724 8 | |
1725 9 | |
1726 $ log 'only(8)' | |
1727 8 | |
1728 $ log 'only(9, 5)' | |
1729 2 | |
1730 4 | |
1731 8 | |
1732 9 | |
1733 $ log 'only(7 + 9, 5 + 2)' | |
1734 4 | |
1735 6 | |
1736 7 | |
1737 8 | |
1738 9 | |
21925
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1739 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1740 Test empty set input |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1741 $ log 'only(p2())' |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1742 $ log 'only(p1(), p2())' |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1743 0 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1744 1 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1745 2 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1746 4 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1747 8 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1748 9 |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1749 |
23765
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1750 Test '%' operator |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1751 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1752 $ log '9%' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1753 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1754 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1755 $ log '9%5' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1756 2 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1757 4 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1758 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1759 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1760 $ log '(7 + 9)%(5 + 2)' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1761 4 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1762 6 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1763 7 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1764 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1765 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1766 |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30179
diff
changeset
|
1767 Test operand of '%' is optimized recursively (issue4670) |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1768 |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1769 $ try --optimize '8:9-8%' |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1770 (onlypost |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1771 (minus |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1772 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1773 (symbol '8') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1774 (symbol '9')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1775 (symbol '8'))) |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1776 * optimized: |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1777 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1778 (symbol 'only') |
28217
d2ac8b57a75d
revset: use smartset minus operator
Durham Goode <durham@fb.com>
parents:
28015
diff
changeset
|
1779 (difference |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1780 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1781 (symbol '8') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1782 (symbol '9')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1783 (symbol '8'))) |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1784 * set: |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1785 <baseset+ [8, 9]> |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1786 8 |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1787 9 |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1788 $ try --optimize '(9)%(5)' |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1789 (only |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1790 (group |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1791 (symbol '9')) |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1792 (group |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1793 (symbol '5'))) |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1794 * optimized: |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1795 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1796 (symbol 'only') |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1797 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1798 (symbol '9') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1799 (symbol '5'))) |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1800 * set: |
28785
87b89dca669d
revset: stabilize repr of baseset initialized with a set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28690
diff
changeset
|
1801 <baseset+ [2, 4, 8, 9]> |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1802 2 |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1803 4 |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1804 8 |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1805 9 |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1806 |
23765
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1807 Test the order of operations |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1808 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1809 $ log '7 + 9%5 + 2' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1810 7 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1811 2 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1812 4 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1813 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1814 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1815 |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1816 Test explicit numeric revision |
23954
310222feb9a8
revset: allow rev(-1) to indicate null revision (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23846
diff
changeset
|
1817 $ log 'rev(-2)' |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1818 $ log 'rev(-1)' |
23954
310222feb9a8
revset: allow rev(-1) to indicate null revision (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23846
diff
changeset
|
1819 -1 |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1820 $ log 'rev(0)' |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1821 0 |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1822 $ log 'rev(9)' |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1823 9 |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1824 $ log 'rev(10)' |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1825 $ log 'rev(tip)' |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1826 hg: parse error: rev expects a number |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1827 [255] |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1828 |
24904
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1829 Test hexadecimal revision |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1830 $ log 'id(2)' |
38855
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1831 $ log 'id(5)' |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1832 2 |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1833 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x5)' |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1834 2 |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1835 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x5' |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1836 2 |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1837 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x)' |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1838 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x' |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1839 abort: 00changelog.i@: ambiguous identifier! |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1840 [255] |
24904
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1841 $ log 'id(23268)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1842 4 |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1843 $ log 'id(2785f51eece)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1844 0 |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1845 $ log 'id(d5d0dcbdc4d9ff5dbb2d336f32f0bb561c1a532c)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1846 8 |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1847 $ log 'id(d5d0dcbdc4a)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1848 $ log 'id(d5d0dcbdc4w)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1849 $ log 'id(d5d0dcbdc4d9ff5dbb2d336f32f0bb561c1a532d)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1850 $ log 'id(d5d0dcbdc4d9ff5dbb2d336f32f0bb561c1a532q)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1851 $ log 'id(1.0)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1852 $ log 'id(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)' |
b5c227f3e461
revset: id() called with 40-byte strings should give the same results as for short strings
Alexander Drozdov <al.drozdov@gmail.com>
parents:
24892
diff
changeset
|
1853 |
23956
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1854 Test null revision |
24204
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1855 $ log '(null)' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1856 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1857 $ log '(null:0)' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1858 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1859 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1860 $ log '(0:null)' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1861 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1862 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1863 $ log 'null::0' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1864 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1865 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1866 $ log 'null:tip - 0:' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1867 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1868 $ log 'null: and null::' | head -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1869 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1870 $ log 'null: or 0:' | head -2 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1871 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1872 0 |
23956
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1873 $ log 'ancestors(null)' |
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1874 -1 |
24204
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1875 $ log 'reverse(null:)' | tail -2 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1876 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1877 -1 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1878 $ log 'first(null:)' |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1879 -1 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1880 $ log 'min(null:)' |
25265
e16456831516
revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents:
25094
diff
changeset
|
1881 BROKEN: should be '-1' |
24202
2de9ee016425
revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents:
24175
diff
changeset
|
1882 $ log 'tip:null and all()' | tail -2 |
2de9ee016425
revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents:
24175
diff
changeset
|
1883 1 |
2de9ee016425
revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents:
24175
diff
changeset
|
1884 0 |
23956
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1885 |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1886 Test working-directory revision |
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1887 $ hg debugrevspec 'wdir()' |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1888 2147483647 |
32404
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1889 $ hg debugrevspec 'wdir()^' |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1890 9 |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1891 $ hg up 7 |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1892 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1893 $ hg debugrevspec 'wdir()^' |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1894 7 |
32437
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1895 $ hg debugrevspec 'wdir()^0' |
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1896 2147483647 |
32441
018f638ad88e
revset: add support for using ~ operator on wdir() predicate
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32440
diff
changeset
|
1897 $ hg debugrevspec 'wdir()~3' |
018f638ad88e
revset: add support for using ~ operator on wdir() predicate
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32440
diff
changeset
|
1898 5 |
32442
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1899 $ hg debugrevspec 'ancestors(wdir())' |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1900 0 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1901 1 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1902 2 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1903 3 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1904 4 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1905 5 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1906 6 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1907 7 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1908 2147483647 |
38522
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1909 $ hg debugrevspec '0:wdir() & ancestor(wdir())' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1910 2147483647 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1911 $ hg debugrevspec '0:wdir() & ancestor(.:wdir())' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1912 4 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1913 $ hg debugrevspec '0:wdir() & ancestor(wdir(), wdir())' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1914 2147483647 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1915 $ hg debugrevspec '0:wdir() & ancestor(wdir(), tip)' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1916 4 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1917 $ hg debugrevspec 'null:wdir() & ancestor(wdir(), null)' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1918 -1 |
32437
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1919 $ hg debugrevspec 'wdir()~0' |
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1920 2147483647 |
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1921 $ hg debugrevspec 'p1(wdir())' |
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1922 7 |
32440
c8fb2a82b5f9
revset: add support for p2(wdir()) to get second parent of working directory
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32437
diff
changeset
|
1923 $ hg debugrevspec 'p2(wdir())' |
32437
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1924 $ hg debugrevspec 'parents(wdir())' |
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1925 7 |
32436
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1926 $ hg debugrevspec 'wdir()^1' |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1927 7 |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1928 $ hg debugrevspec 'wdir()^2' |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1929 $ hg debugrevspec 'wdir()^3' |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1930 hg: parse error: ^ expects a number 0, 1, or 2 |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1931 [255] |
32404
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1932 For tests consistency |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1933 $ hg up 9 |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1934 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1935 $ hg debugrevspec 'tip or wdir()' |
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1936 9 |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1937 2147483647 |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1938 $ hg debugrevspec '0:tip and wdir()' |
25766
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1939 $ log '0:wdir()' | tail -3 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1940 8 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1941 9 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1942 2147483647 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1943 $ log 'wdir():0' | head -3 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1944 2147483647 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1945 9 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1946 8 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1947 $ log 'wdir():wdir()' |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1948 2147483647 |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1949 $ log '(all() + wdir()) & min(. + wdir())' |
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1950 9 |
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1951 $ log '(all() + wdir()) & max(. + wdir())' |
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1952 2147483647 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1953 $ log 'first(wdir() + .)' |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1954 2147483647 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1955 $ log 'last(. + wdir())' |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1956 2147483647 |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1957 |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1958 Test working-directory integer revision and node id |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1959 (BUG: '0:wdir()' is still needed to populate wdir revision) |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1960 |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1961 $ hg debugrevspec '0:wdir() & 2147483647' |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1962 2147483647 |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1963 $ hg debugrevspec '0:wdir() & rev(2147483647)' |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1964 2147483647 |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1965 $ hg debugrevspec '0:wdir() & ffffffffffffffffffffffffffffffffffffffff' |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1966 2147483647 |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1967 $ hg debugrevspec '0:wdir() & ffffffffffff' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1968 2147483647 |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1969 $ hg debugrevspec '0:wdir() & id(ffffffffffffffffffffffffffffffffffffffff)' |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1970 2147483647 |
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1971 $ hg debugrevspec '0:wdir() & id(ffffffffffff)' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1972 2147483647 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1973 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1974 $ cd .. |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1975 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1976 Test short 'ff...' hash collision |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1977 (BUG: '0:wdir()' is still needed to populate wdir revision) |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1978 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1979 $ hg init wdir-hashcollision |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1980 $ cd wdir-hashcollision |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1981 $ cat <<EOF >> .hg/hgrc |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1982 > [experimental] |
34866
1644623ab096
config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents:
34126
diff
changeset
|
1983 > evolution.createmarkers=True |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1984 > EOF |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1985 $ echo 0 > a |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1986 $ hg ci -qAm 0 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1987 $ for i in 2463 2961 6726 78127; do |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1988 > hg up -q 0 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1989 > echo $i > a |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1990 > hg ci -qm $i |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1991 > done |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1992 $ hg up -q null |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1993 $ hg log -r '0:wdir()' -T '{rev}:{node} {shortest(node, 3)}\n' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1994 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a b4e |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1995 1:fffbae3886c8fbb2114296380d276fd37715d571 fffba |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1996 2:fffb6093b00943f91034b9bdad069402c834e572 fffb6 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1997 3:fff48a9b9de34a4d64120c29548214c67980ade3 fff4 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1998 4:ffff85cff0ff78504fcdc3c0bc10de0c65379249 ffff8 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1999 2147483647:ffffffffffffffffffffffffffffffffffffffff fffff |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2000 $ hg debugobsolete fffbae3886c8fbb2114296380d276fd37715d571 |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33417
diff
changeset
|
2001 obsoleted 1 changesets |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2002 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2003 $ hg debugrevspec '0:wdir() & fff' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2004 abort: 00changelog.i@fff: ambiguous identifier! |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2005 [255] |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2006 $ hg debugrevspec '0:wdir() & ffff' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2007 abort: 00changelog.i@ffff: ambiguous identifier! |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2008 [255] |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2009 $ hg debugrevspec '0:wdir() & fffb' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2010 abort: 00changelog.i@fffb: ambiguous identifier! |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2011 [255] |
37867
0a79fb64118e
revset: use resolvehexnodeidprefix() in id() predicate (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
37866
diff
changeset
|
2012 BROKEN should be '2' (node lookup uses unfiltered repo) |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2013 $ hg debugrevspec '0:wdir() & id(fffb)' |
37867
0a79fb64118e
revset: use resolvehexnodeidprefix() in id() predicate (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
37866
diff
changeset
|
2014 BROKEN should be '2' (node lookup uses unfiltered repo) |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2015 $ hg debugrevspec '0:wdir() & ffff8' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2016 4 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2017 $ hg debugrevspec '0:wdir() & fffff' |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2018 2147483647 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2019 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2020 $ cd .. |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
2021 |
32683
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2022 Test branch() with wdir() |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2023 |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2024 $ cd repo |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2025 |
32683
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2026 $ log '0:wdir() & branch("literal:é")' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2027 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2028 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2029 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2030 $ log '0:wdir() & branch("re:é")' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2031 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2032 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2033 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2034 $ log '0:wdir() & branch("re:^a")' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2035 0 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2036 2 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2037 $ log '0:wdir() & branch(8)' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2038 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2039 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2040 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2041 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2042 branch(wdir()) returns all revisions belonging to the working branch. The wdir |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2043 itself isn't returned unless it is explicitly populated. |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2044 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2045 $ log 'branch(wdir())' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2046 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2047 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2048 $ log '0:wdir() & branch(wdir())' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2049 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2050 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2051 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2052 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2053 $ log 'outgoing()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2054 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2055 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2056 $ log 'outgoing("../remote1")' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2057 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2058 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2059 $ log 'outgoing("../remote2")' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2060 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2061 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2062 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2063 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2064 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2065 $ log 'p1(merge())' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2066 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2067 $ log 'p2(merge())' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2068 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2069 $ log 'parents(merge())' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2070 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2071 5 |
17753
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2072 $ log 'p1(branchpoint())' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2073 0 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2074 2 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2075 $ log 'p2(branchpoint())' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2076 $ log 'parents(branchpoint())' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2077 0 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2078 2 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2079 $ log 'removes(a)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2080 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2081 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2082 $ log 'roots(all())' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2083 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2084 $ log 'reverse(2 or 3 or 4 or 5)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2085 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2086 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2087 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2088 2 |
17100
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2089 $ log 'reverse(all())' |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2090 9 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2091 8 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2092 7 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2093 6 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2094 5 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2095 4 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2096 3 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2097 2 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2098 1 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2099 0 |
23826
c90d195320c5
revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents:
23062
diff
changeset
|
2100 $ log 'reverse(all()) & filelog(b)' |
c90d195320c5
revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents:
23062
diff
changeset
|
2101 4 |
c90d195320c5
revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents:
23062
diff
changeset
|
2102 1 |
12716
c7e619e30ba3
revset: add id() and rev() to allow explicitly referring to changes by hash or rev
Augie Fackler <durin42@gmail.com>
parents:
12715
diff
changeset
|
2103 $ log 'rev(5)' |
c7e619e30ba3
revset: add id() and rev() to allow explicitly referring to changes by hash or rev
Augie Fackler <durin42@gmail.com>
parents:
12715
diff
changeset
|
2104 5 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2105 $ log 'sort(limit(reverse(all()), 3))' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2106 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2107 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2108 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2109 $ log 'sort(2 or 3 or 4 or 5, date)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2110 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2111 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2112 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2113 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2114 $ log 'tagged()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2115 6 |
12715
33820dccbea4
revset: rename tagged() to tag() and allow it to take an optional tag name
Augie Fackler <durin42@gmail.com>
parents:
12616
diff
changeset
|
2116 $ log 'tag()' |
33820dccbea4
revset: rename tagged() to tag() and allow it to take an optional tag name
Augie Fackler <durin42@gmail.com>
parents:
12616
diff
changeset
|
2117 6 |
33820dccbea4
revset: rename tagged() to tag() and allow it to take an optional tag name
Augie Fackler <durin42@gmail.com>
parents:
12616
diff
changeset
|
2118 $ log 'tag(1.0)' |
33820dccbea4
revset: rename tagged() to tag() and allow it to take an optional tag name
Augie Fackler <durin42@gmail.com>
parents:
12616
diff
changeset
|
2119 6 |
33820dccbea4
revset: rename tagged() to tag() and allow it to take an optional tag name
Augie Fackler <durin42@gmail.com>
parents:
12616
diff
changeset
|
2120 $ log 'tag(tip)' |
33820dccbea4
revset: rename tagged() to tag() and allow it to take an optional tag name
Augie Fackler <durin42@gmail.com>
parents:
12616
diff
changeset
|
2121 9 |
16820
20f55613fb2a
revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents:
16778
diff
changeset
|
2122 |
29139
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2123 Test order of revisions in compound expression |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2124 ---------------------------------------------- |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2125 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2126 The general rule is that only the outermost (= leftmost) predicate can |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2127 enforce its ordering requirement. The other predicates should take the |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2128 ordering defined by it. |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2129 |
29139
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2130 'A & B' should follow the order of 'A': |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2131 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2132 $ log '2:0 & 0::2' |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2133 2 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2134 1 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2135 0 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2136 |
29408
785cadec2091
revset: make head() honor order of subset
Martin von Zweigbergk <martinvonz@google.com>
parents:
29390
diff
changeset
|
2137 'head()' combines sets in right order: |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2138 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2139 $ log '2:0 & head()' |
29408
785cadec2091
revset: make head() honor order of subset
Martin von Zweigbergk <martinvonz@google.com>
parents:
29390
diff
changeset
|
2140 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2141 1 |
29408
785cadec2091
revset: make head() honor order of subset
Martin von Zweigbergk <martinvonz@google.com>
parents:
29390
diff
changeset
|
2142 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2143 |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2144 'x:y' takes ordering parameter into account: |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2145 |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2146 $ try -p optimized '3:0 & 0:3 & not 2:1' |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2147 * optimized: |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2148 (difference |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2149 (and |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2150 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2151 (symbol '3') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2152 (symbol '0')) |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2153 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2154 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2155 (symbol '3'))) |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2156 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2157 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2158 (symbol '1'))) |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2159 * set: |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2160 <filteredset |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2161 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2162 <spanset- 0:4>, |
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2163 <spanset+ 0:4>>, |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2164 <not |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2165 <spanset+ 1:3>>> |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2166 3 |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2167 0 |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2168 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2169 'a + b', which is optimized to '_list(a b)', should take the ordering of |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2170 the left expression: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2171 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2172 $ try --optimize '2:0 & (0 + 1 + 2)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2173 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2174 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2175 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2176 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2177 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2178 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2179 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2180 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2181 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2182 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2183 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2184 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2185 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2186 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2187 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2188 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2189 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2190 (string '0\x001\x002'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2191 * set: |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2192 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2193 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2194 <baseset [0, 1, 2]>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2195 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2196 1 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2197 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2198 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2199 'A + B' should take the ordering of the left expression: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2200 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2201 $ try --optimize '2:0 & (0:1 + 2)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2202 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2203 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2204 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2205 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2206 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2207 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2208 (list |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2209 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2210 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2211 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2212 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2213 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2214 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2215 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2216 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2217 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2218 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2219 (list |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2220 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2221 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2222 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2223 (symbol '2')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2224 * set: |
29934
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2225 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2226 <spanset- 0:3>, |
29934
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2227 <addset |
34010
72b5f4d53c58
revset: drop optimization about reordering "or" set elements
Jun Wu <quark@fb.com>
parents:
33868
diff
changeset
|
2228 <spanset+ 0:2>, |
72b5f4d53c58
revset: drop optimization about reordering "or" set elements
Jun Wu <quark@fb.com>
parents:
33868
diff
changeset
|
2229 <baseset [2]>>> |
29934
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2230 2 |
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2231 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2232 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2233 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2234 '_intlist(a b)' should behave like 'a + b': |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2235 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2236 $ trylist --optimize '2:0 & %ld' 0 1 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2237 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2238 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2239 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2240 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2241 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2242 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2243 (string '0\x001\x002'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2244 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2245 (andsmally |
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2246 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2247 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2248 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2249 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2250 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2251 (string '0\x001\x002'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2252 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2253 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2254 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2255 <baseset+ [0, 1, 2]>> |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2256 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2257 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2258 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2259 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2260 $ trylist --optimize '%ld & 2:0' 0 2 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2261 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2262 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2263 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2264 (string '0\x002\x001')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2265 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2266 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2267 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2268 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2269 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2270 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2271 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2272 (string '0\x002\x001')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2273 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2274 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2275 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2276 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2277 <filteredset |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2278 <baseset [0, 2, 1]>, |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2279 <spanset- 0:3>> |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2280 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2281 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2282 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2283 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2284 '_hexlist(a b)' should behave like 'a + b': |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2285 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2286 $ trylist --optimize --bin '2:0 & %ln' `hg log -T '{node} ' -r0:2` |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2287 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2288 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2289 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2290 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2291 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2292 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2293 (string '*'))) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2294 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2295 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2296 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2297 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2298 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2299 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2300 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2301 (string '*'))) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2302 * set: |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2303 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2304 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2305 <baseset [0, 1, 2]>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2306 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2307 1 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2308 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2309 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2310 $ trylist --optimize --bin '%ln & 2:0' `hg log -T '{node} ' -r0+2+1` |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2311 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2312 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2313 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2314 (string '*')) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2315 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2316 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2317 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2318 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2319 (andsmally |
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2320 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2321 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2322 (string '*')) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2323 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2324 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2325 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2326 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2327 <baseset [0, 2, 1]> |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2328 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2329 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2330 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2331 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2332 '_list' should not go through the slow follow-order path if order doesn't |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2333 matter: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2334 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2335 $ try -p optimized '2:0 & not (0 + 1)' |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2336 * optimized: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2337 (difference |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2338 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2339 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2340 (symbol '0')) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2341 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2342 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2343 (string '0\x001'))) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2344 * set: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2345 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2346 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2347 <not |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2348 <baseset [0, 1]>>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2349 2 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2350 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2351 $ try -p optimized '2:0 & not (0:2 & (0 + 1))' |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2352 * optimized: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2353 (difference |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2354 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2355 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2356 (symbol '0')) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2357 (and |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2358 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2359 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2360 (symbol '2')) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2361 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2362 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2363 (string '0\x001')))) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2364 * set: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2365 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2366 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2367 <not |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2368 <baseset [0, 1]>>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2369 2 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2370 |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2371 because 'present()' does nothing other than suppressing an error, the |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2372 ordering requirement should be forwarded to the nested expression |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2373 |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2374 $ try -p optimized 'present(2 + 0 + 1)' |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2375 * optimized: |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2376 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2377 (symbol 'present') |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2378 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2379 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2380 (string '2\x000\x001'))) |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2381 * set: |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2382 <baseset [2, 0, 1]> |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2383 2 |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2384 0 |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2385 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2386 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2387 $ try --optimize '2:0 & present(0 + 1 + 2)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2388 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2389 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2390 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2391 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2392 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2393 (symbol 'present') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2394 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2395 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2396 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2397 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2398 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2399 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2400 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2401 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2402 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2403 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2404 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2405 (symbol 'present') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2406 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2407 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2408 (string '0\x001\x002')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2409 * set: |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2410 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2411 <spanset- 0:3>, |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2412 <baseset [0, 1, 2]>> |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2413 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2414 1 |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2415 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2416 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2417 'reverse()' should take effect only if it is the outermost expression: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2418 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2419 $ try --optimize '0:2 & reverse(all())' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2420 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2421 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2422 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2423 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2424 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2425 (symbol 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2426 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2427 (symbol 'all') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2428 None))) |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2429 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2430 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2431 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2432 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2433 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2434 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2435 (symbol 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2436 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2437 (symbol 'all') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
2438 None))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2439 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2440 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2441 <spanset+ 0:3>, |
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2442 <spanset+ 0:10>> |
29945
89dbae952ec1
revset: make reverse() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29944
diff
changeset
|
2443 0 |
89dbae952ec1
revset: make reverse() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29944
diff
changeset
|
2444 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2445 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2446 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2447 'sort()' should take effect only if it is the outermost expression: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2448 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2449 $ try --optimize '0:2 & sort(all(), -rev)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2450 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2451 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2452 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2453 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2454 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2455 (symbol 'sort') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2456 (list |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2457 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2458 (symbol 'all') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2459 None) |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2460 (negate |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2461 (symbol 'rev'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2462 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2463 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2464 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2465 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2466 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2467 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2468 (symbol 'sort') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2469 (list |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2470 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2471 (symbol 'all') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
2472 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2473 (string '-rev')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2474 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2475 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2476 <spanset+ 0:3>, |
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2477 <spanset+ 0:10>> |
29946
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2478 0 |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2479 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2480 2 |
29946
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2481 |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2482 invalid argument passed to noop sort(): |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2483 |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2484 $ log '0:2 & sort()' |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2485 hg: parse error: sort requires one or two arguments |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2486 [255] |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2487 $ log '0:2 & sort(all(), -invalid)' |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2488 hg: parse error: unknown sort key '-invalid' |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2489 [255] |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2490 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2491 for 'A & f(B)', 'B' should not be affected by the order of 'A': |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2492 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2493 $ try --optimize '2:0 & first(1 + 0 + 2)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2494 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2495 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2496 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2497 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2498 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2499 (symbol 'first') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2500 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2501 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2502 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2503 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2504 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2505 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2506 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2507 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2508 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2509 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2510 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2511 (symbol 'first') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2512 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2513 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2514 (string '1\x000\x002')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2515 * set: |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
2516 <filteredset |
32820
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
2517 <baseset [1]>, |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2518 <spanset- 0:3>> |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2519 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2520 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2521 $ try --optimize '2:0 & not last(0 + 2 + 1)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2522 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2523 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2524 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2525 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2526 (not |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2527 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2528 (symbol 'last') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2529 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2530 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2531 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2532 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2533 (symbol '1')))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2534 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2535 (difference |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2536 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2537 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2538 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2539 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2540 (symbol 'last') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2541 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2542 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2543 (string '0\x002\x001')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2544 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2545 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2546 <spanset- 0:3>, |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2547 <not |
32820
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
2548 <baseset [1]>>> |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2549 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2550 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2551 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2552 for 'A & (op)(B)', 'B' should not be affected by the order of 'A': |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2553 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2554 $ try --optimize '2:0 & (1 + 0 + 2):(0 + 2 + 1)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2555 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2556 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2557 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2558 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2559 (range |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2560 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2561 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2562 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2563 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2564 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2565 (symbol '2')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2566 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2567 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2568 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2569 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2570 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2571 (symbol '1')))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2572 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2573 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2574 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2575 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2576 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2577 (range |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2578 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2579 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2580 (string '1\x000\x002')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2581 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2582 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2583 (string '0\x002\x001')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2584 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2585 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2586 <spanset- 0:3>, |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2587 <baseset [1]>> |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2588 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2589 |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
2590 'A & B' can be rewritten as 'flipand(B, A)' by weight. |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2591 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2592 $ try --optimize 'contains("glob:*") & (2 + 0 + 1)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2593 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2594 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2595 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2596 (string 'glob:*')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2597 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2598 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2599 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2600 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2601 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2602 (symbol '1'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2603 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2604 (andsmally |
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2605 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2606 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2607 (string 'glob:*')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2608 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2609 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2610 (string '2\x000\x001'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2611 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2612 <filteredset |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2613 <baseset+ [0, 1, 2]>, |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2614 <contains 'glob:*'>> |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2615 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2616 1 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2617 2 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2618 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2619 and in this example, 'A & B' is rewritten as 'B & A', but 'A' overrides |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2620 the order appropriately: |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2621 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2622 $ try --optimize 'reverse(contains("glob:*")) & (0 + 2 + 1)' |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2623 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2624 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2625 (symbol 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2626 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2627 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2628 (string 'glob:*'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2629 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2630 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2631 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2632 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2633 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2634 (symbol '1'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2635 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2636 (andsmally |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2637 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2638 (symbol 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2639 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2640 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2641 (string 'glob:*'))) |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2642 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2643 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2644 (string '0\x002\x001'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2645 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2646 <filteredset |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2647 <baseset- [0, 1, 2]>, |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2648 <contains 'glob:*'>> |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2649 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2650 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2651 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2652 |
20717
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2653 test sort revset |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2654 -------------------------------------------- |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2655 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2656 test when adding two unordered revsets |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2657 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2658 $ log 'sort(keyword(issue) or modifies(b))' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2659 4 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2660 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2661 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2662 test when sorting a reversed collection in the same way it is |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2663 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2664 $ log 'sort(reverse(all()), -rev)' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2665 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2666 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2667 7 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2668 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2669 5 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2670 4 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2671 3 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2672 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2673 1 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2674 0 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2675 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2676 test when sorting a reversed collection |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2677 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2678 $ log 'sort(reverse(all()), rev)' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2679 0 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2680 1 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2681 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2682 3 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2683 4 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2684 5 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2685 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2686 7 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2687 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2688 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2689 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2690 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2691 test sorting two sorted collections in different orders |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2692 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2693 $ log 'sort(outgoing() or reverse(removes(a)), rev)' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2694 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2695 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2696 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2697 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2698 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2699 test sorting two sorted collections in different orders backwards |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2700 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2701 $ log 'sort(outgoing() or reverse(removes(a)), -rev)' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2702 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2703 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2704 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2705 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2706 |
29362
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2707 test empty sort key which is noop |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2708 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2709 $ log 'sort(0 + 2 + 1, "")' |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2710 0 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2711 2 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2712 1 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2713 |
29264
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2714 test invalid sort keys |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2715 |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2716 $ log 'sort(all(), -invalid)' |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2717 hg: parse error: unknown sort key '-invalid' |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2718 [255] |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2719 |
29001
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2720 $ cd .. |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2721 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2722 test sorting by multiple keys including variable-length strings |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2723 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2724 $ hg init sorting |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2725 $ cd sorting |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2726 $ cat <<EOF >> .hg/hgrc |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2727 > [ui] |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2728 > logtemplate = '{rev} {branch|p5}{desc|p5}{author|p5}{date|hgdate}\n' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2729 > [templatealias] |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2730 > p5(s) = pad(s, 5) |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2731 > EOF |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2732 $ hg branch -qf b12 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2733 $ hg ci -m m111 -u u112 -d '111 10800' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2734 $ hg branch -qf b11 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2735 $ hg ci -m m12 -u u111 -d '112 7200' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2736 $ hg branch -qf b111 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2737 $ hg ci -m m11 -u u12 -d '111 3600' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2738 $ hg branch -qf b112 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2739 $ hg ci -m m111 -u u11 -d '120 0' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2740 $ hg branch -qf b111 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2741 $ hg ci -m m112 -u u111 -d '110 14400' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2742 created new head |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2743 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2744 compare revisions (has fast path): |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2745 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2746 $ hg log -r 'sort(all(), rev)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2747 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2748 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2749 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2750 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2751 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2752 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2753 $ hg log -r 'sort(all(), -rev)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2754 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2755 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2756 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2757 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2758 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2759 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2760 compare variable-length strings (issue5218): |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2761 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2762 $ hg log -r 'sort(all(), branch)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2763 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2764 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2765 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2766 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2767 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2768 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2769 $ hg log -r 'sort(all(), -branch)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2770 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2771 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2772 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2773 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2774 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2775 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2776 $ hg log -r 'sort(all(), desc)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2777 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2778 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2779 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2780 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2781 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2782 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2783 $ hg log -r 'sort(all(), -desc)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2784 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2785 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2786 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2787 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2788 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2789 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2790 $ hg log -r 'sort(all(), user)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2791 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2792 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2793 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2794 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2795 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2796 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2797 $ hg log -r 'sort(all(), -user)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2798 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2799 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2800 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2801 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2802 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2803 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2804 compare dates (tz offset should have no effect): |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2805 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2806 $ hg log -r 'sort(all(), date)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2807 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2808 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2809 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2810 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2811 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2812 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2813 $ hg log -r 'sort(all(), -date)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2814 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2815 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2816 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2817 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2818 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2819 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2820 be aware that 'sort(x, -k)' is not exactly the same as 'reverse(sort(x, k))' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2821 because '-k' reverses the comparison, not the list itself: |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2822 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2823 $ hg log -r 'sort(0 + 2, date)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2824 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2825 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2826 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2827 $ hg log -r 'sort(0 + 2, -date)' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2828 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2829 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2830 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2831 $ hg log -r 'reverse(sort(0 + 2, date))' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2832 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2833 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2834 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2835 sort by multiple keys: |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2836 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2837 $ hg log -r 'sort(all(), "branch -rev")' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2838 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2839 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2840 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2841 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2842 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2843 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2844 $ hg log -r 'sort(all(), "-desc -date")' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2845 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2846 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2847 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2848 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2849 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2850 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2851 $ hg log -r 'sort(all(), "user -branch date rev")' |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2852 3 b112 m111 u11 120 0 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2853 4 b111 m112 u111 110 14400 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2854 1 b11 m12 u111 112 7200 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2855 0 b12 m111 u112 111 10800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2856 2 b111 m11 u12 111 3600 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2857 |
29348
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2858 toposort prioritises graph branches |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2859 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2860 $ hg up 2 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2861 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2862 $ touch a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2863 $ hg addremove |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2864 adding a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2865 $ hg ci -m 't1' -u 'tu' -d '130 0' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2866 created new head |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2867 $ echo 'a' >> a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2868 $ hg ci -m 't2' -u 'tu' -d '130 0' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2869 $ hg book book1 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2870 $ hg up 4 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2871 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2872 (leaving bookmark book1) |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2873 $ touch a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2874 $ hg addremove |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2875 adding a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2876 $ hg ci -m 't3' -u 'tu' -d '130 0' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2877 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2878 $ hg log -r 'sort(all(), topo)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2879 7 b111 t3 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2880 4 b111 m112 u111 110 14400 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2881 3 b112 m111 u11 120 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2882 6 b111 t2 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2883 5 b111 t1 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2884 2 b111 m11 u12 111 3600 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2885 1 b11 m12 u111 112 7200 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2886 0 b12 m111 u112 111 10800 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2887 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2888 $ hg log -r 'sort(all(), -topo)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2889 0 b12 m111 u112 111 10800 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2890 1 b11 m12 u111 112 7200 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2891 2 b111 m11 u12 111 3600 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2892 5 b111 t1 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2893 6 b111 t2 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2894 3 b112 m111 u11 120 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2895 4 b111 m112 u111 110 14400 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2896 7 b111 t3 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2897 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2898 $ hg log -r 'sort(all(), topo, topo.firstbranch=book1)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2899 6 b111 t2 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2900 5 b111 t1 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2901 7 b111 t3 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2902 4 b111 m112 u111 110 14400 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2903 3 b112 m111 u11 120 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2904 2 b111 m11 u12 111 3600 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2905 1 b11 m12 u111 112 7200 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2906 0 b12 m111 u112 111 10800 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2907 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2908 topographical sorting can't be combined with other sort keys, and you can't |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2909 use the topo.firstbranch option when topo sort is not active: |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2910 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2911 $ hg log -r 'sort(all(), "topo user")' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2912 hg: parse error: topo sort order cannot be combined with other sort keys |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2913 [255] |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2914 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2915 $ hg log -r 'sort(all(), user, topo.firstbranch=book1)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2916 hg: parse error: topo.firstbranch can only be used when using the topo sort key |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2917 [255] |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2918 |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2919 topo.firstbranch should accept any kind of expressions: |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2920 |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2921 $ hg log -r 'sort(0, topo, topo.firstbranch=(book1))' |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2922 0 b12 m111 u112 111 10800 |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2923 |
29001
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2924 $ cd .. |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2925 $ cd repo |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2926 |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2927 test multiline revset with errors |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2928 |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2929 $ echo > multiline-revset |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2930 $ echo '. +' >> multiline-revset |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2931 $ echo '.^ +' >> multiline-revset |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2932 $ hg log -r "`cat multiline-revset`" |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2933 hg: parse error at 9: not a prefix: end |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2934 ( . + .^ + |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2935 ^ here) |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2936 [255] |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2937 $ hg debugrevspec -v 'revset(first(rev(0)))' -p all |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2938 * parsed: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2939 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2940 (symbol 'revset') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2941 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2942 (symbol 'first') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2943 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2944 (symbol 'rev') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2945 (symbol '0')))) |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2946 * expanded: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2947 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2948 (symbol 'revset') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2949 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2950 (symbol 'first') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2951 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2952 (symbol 'rev') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2953 (symbol '0')))) |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2954 * concatenated: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2955 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2956 (symbol 'revset') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2957 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2958 (symbol 'first') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2959 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2960 (symbol 'rev') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2961 (symbol '0')))) |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2962 * analyzed: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2963 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2964 (symbol 'revset') |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2965 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2966 (symbol 'first') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2967 (func |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2968 (symbol 'rev') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2969 (symbol '0')))) |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2970 * optimized: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2971 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2972 (symbol 'revset') |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2973 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2974 (symbol 'first') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2975 (func |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2976 (symbol 'rev') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2977 (symbol '0')))) |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2978 * set: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2979 <baseset+ [0]> |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2980 0 |
41680
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2981 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2982 abort if the revset doesn't expect given size |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2983 $ log 'expectsize()' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2984 hg: parse error: invalid set of arguments |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2985 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2986 $ log 'expectsize(0:2, a)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2987 hg: parse error: expectsize requires a size range or a positive integer |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2988 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2989 $ log 'expectsize(0:2, 3)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2990 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2991 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2992 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2993 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2994 $ log 'expectsize(2:0, 3)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2995 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2996 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2997 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2998 $ log 'expectsize(0:1, 1)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2999 abort: revset size mismatch. expected 1, got 2! |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3000 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3001 $ log 'expectsize(0:4, -1)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3002 hg: parse error: negative size |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3003 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3004 $ log 'expectsize(0:2, 2:4)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3005 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3006 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3007 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3008 $ log 'expectsize(0:1, 3:5)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3009 abort: revset size mismatch. expected between 3 and 5, got 2! |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3010 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3011 $ log 'expectsize(0:1, -1:2)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3012 hg: parse error: negative size |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3013 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3014 $ log 'expectsize(0:1, 1:-2)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3015 hg: parse error: negative size |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3016 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3017 $ log 'expectsize(0:2, a:4)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3018 hg: parse error: size range bounds must be integers |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3019 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3020 $ log 'expectsize(0:2, 2:b)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3021 hg: parse error: size range bounds must be integers |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3022 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3023 $ log 'expectsize(0:2, 2:)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3024 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3025 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3026 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3027 $ log 'expectsize(0:2, :5)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3028 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3029 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3030 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3031 $ log 'expectsize(0:2, :)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3032 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3033 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3034 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3035 $ log 'expectsize(0:2, 4:)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3036 abort: revset size mismatch. expected between 4 and 11, got 3! |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3037 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3038 $ log 'expectsize(0:2, :2)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3039 abort: revset size mismatch. expected between 0 and 2, got 3! |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3040 [255] |