Mercurial > hg
annotate tests/test-revset.t @ 42618:c17e6a3e7356
phabricator: handle local:commits time being string or int
When setting local:commits arcanist has different behaviour depending on
whether the repo is git or hg. With hg it sets the time as a number, since it
calls PHP's strtotime on the value, but with git it sets it as a string.
Normally this wouldn't be an issue since phabread wouldn't be interacting with
Phabricator Revisions for git repos, but Mozilla has a secondary workflow for
git users that uses the git-cinnabar tool to interact with their hg repos. When
a git-cinnabar user uses the moz-phab tool to submit patches for mozilla-central
it makes use of Mozilla's fork of arcanist, which works with their local git
version of m-c, and thus sets the local:commit time as a string, and then
translates the commit hashes.
Currently when encountering such DREVS phabread dies with "TypeError: %d format:
a number is required, not str".
phabsend also used to set it as a string but wouldn't have encountered the
issue with its own DREVs since it would read hg:meta first.
Differential Revision: https://phab.mercurial-scm.org/D6650
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Tue, 16 Jul 2019 19:18:16 +0100 |
parents | 43c8f72184f4 |
children | 99ebde4fec99 |
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] |
42232
29798c9ba5c9
parser: fix crash by parsing "()" in keyword argument position
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
475 $ log 'extra((), x)' |
29798c9ba5c9
parser: fix crash by parsing "()" in keyword argument position
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
476 hg: parse error: first argument to extra must be a string |
29798c9ba5c9
parser: fix crash by parsing "()" in keyword argument position
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
477 [255] |
29798c9ba5c9
parser: fix crash by parsing "()" in keyword argument position
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
478 $ log 'extra(label=x, ())' |
29798c9ba5c9
parser: fix crash by parsing "()" in keyword argument position
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
479 hg: parse error: extra got an invalid argument |
29798c9ba5c9
parser: fix crash by parsing "()" in keyword argument position
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
480 [255] |
25706
b7f53c474e2c
revset: port extra() to support keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents:
25704
diff
changeset
|
481 |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
482 $ try 'foo=bar|baz' |
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
483 (keyvalue |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
484 (symbol 'foo') |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
485 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
486 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
487 (symbol 'bar') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
488 (symbol 'baz')))) |
25704
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
489 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
|
490 [255] |
70a2082f855a
revset: add parsing rule for key=value pair
Yuya Nishihara <yuya@tcha.org>
parents:
25632
diff
changeset
|
491 |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
492 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
|
493 |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
494 $ try --optimize 'foo=(not public())' |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
495 (keyvalue |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
496 (symbol 'foo') |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
497 (group |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
498 (not |
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 'public') |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
501 None)))) |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
502 * optimized: |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
503 (keyvalue |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
504 (symbol 'foo') |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
505 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
506 (symbol '_notpublic') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
507 None)) |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
508 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
|
509 [255] |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
510 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
511 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
|
512 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
513 $ 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
|
514 * parsed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
515 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
516 (symbol 'tip') |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
517 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
518 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
519 (symbol 'tip')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
520 (symbol 'generations') |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
521 (negate |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
522 (symbol '1')))) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
523 9 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
524 8 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
525 7 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
526 6 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
527 5 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
528 4 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
529 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
530 $ 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
|
531 * parsed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
532 (not |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
533 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
534 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
535 (symbol 'public') |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
536 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
537 (symbol 'generations') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
538 (symbol '0'))) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
539 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
540 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
|
541 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
542 $ 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
|
543 > '(not public())#generations[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
544 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
545 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
546 (not |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
547 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
548 (symbol 'public') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
549 None)) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
550 (symbol 'generations') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
551 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
552 * optimized: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
553 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
554 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
555 (symbol '_notpublic') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
556 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
557 (symbol 'generations') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
558 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
559 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
560 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
|
561 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
562 $ hg debugrevspec -p analyzed 'tip[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
563 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
564 (subscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
565 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
566 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
567 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
|
568 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
569 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
570 $ hg debugrevspec -p analyzed 'tip#rel[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
571 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
572 (relsubscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
573 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
574 (symbol 'rel') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
575 (symbol '0')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
576 hg: parse error: unknown identifier: rel |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
577 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
578 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
579 $ hg debugrevspec -p analyzed '(tip#rel)[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
580 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
581 (subscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
582 (relation |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
583 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
584 (symbol 'rel')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
585 (symbol '0')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
586 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
|
587 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
588 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
589 $ 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
|
590 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
591 (subscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
592 (relsubscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
593 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
594 (symbol 'rel') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
595 (symbol '0')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
596 (symbol '1')) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
597 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
|
598 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
599 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
600 $ 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
|
601 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
602 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
603 (relation |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
604 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
605 (symbol 'rel0')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
606 (symbol 'rel1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
607 (symbol '1')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
608 hg: parse error: unknown identifier: rel1 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
609 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
610 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
611 $ 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
|
612 * analyzed: |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
613 (relsubscript |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
614 (relsubscript |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
615 (symbol 'tip') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
616 (symbol 'rel0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
617 (symbol '0')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
618 (symbol 'rel1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
619 (symbol '1')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
620 hg: parse error: unknown identifier: rel1 |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
621 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
622 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
623 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
|
624 |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
625 $ hg debugrevspec '[0]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
626 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
|
627 ([0] |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
628 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
629 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
630 $ hg debugrevspec '.#' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
631 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
|
632 (.# |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
633 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
634 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
635 $ hg debugrevspec '#rel' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
636 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
|
637 (#rel |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
638 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
639 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
640 $ hg debugrevspec '.#rel[0' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
641 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
|
642 (.#rel[0 |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
643 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
644 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
645 $ hg debugrevspec '.]' |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
646 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
|
647 (.] |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
648 ^ here) |
33416
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
649 [255] |
9467d5337292
revset: add experimental relation and subscript operators
Yuya Nishihara <yuya@tcha.org>
parents:
33377
diff
changeset
|
650 |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
651 $ hg debugrevspec '.#generations[a]' |
41563
13f7a6a4f0db
revset: leverage getintrange() helper in relation-subscript operation (API)
Yuya Nishihara <yuya@tcha.org>
parents:
41387
diff
changeset
|
652 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
|
653 [255] |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
654 $ 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
|
655 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
|
656 [255] |
41359
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
657 $ hg debugrevspec '.#generations[foo:bar]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
658 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
|
659 [255] |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
660 |
40931
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
661 suggested relations |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
662 |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
663 $ hg debugrevspec '.#generafions[0]' |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
664 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
|
665 (did you mean generations?) |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
666 [255] |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
667 |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
668 $ hg debugrevspec '.#f[0]' |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
669 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
|
670 [255] |
e54bfde922f2
revset: move subscript relation functions to its own dict
Anton Shestakov <av6@dwimlabs.net>
parents:
40311
diff
changeset
|
671 |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
672 parsed tree at stages: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
673 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
674 $ hg debugrevspec -p all '()' |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
675 * parsed: |
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 * expanded: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
679 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
680 None) |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
681 * concatenated: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
682 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
683 None) |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
684 * analyzed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
685 None |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
686 * optimized: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
687 None |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
688 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
|
689 [255] |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
690 |
29923
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
691 $ 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
|
692 * parsed: |
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 * expanded: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
696 (group |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
697 None) |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
698 * concatenated: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
699 (group |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
700 None) |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
701 * analyzed: |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
702 None |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
703 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
|
704 [255] |
429fd2747d9a
debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org>
parents:
29913
diff
changeset
|
705 |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
706 $ 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
|
707 * parsed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
708 (minus |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
709 (group |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
710 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
711 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
712 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
713 (symbol '1')))) |
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 * analyzed: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
716 (and |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
717 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
718 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
719 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
720 (symbol '1'))) |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
721 (not |
34073
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 * optimized: |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
724 (difference |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
725 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
726 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
727 (string '0\x001')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
728 (symbol '1')) |
29913
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
729 0 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
730 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
731 $ 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
|
732 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
|
733 [255] |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
734 |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
735 $ 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
|
736 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
|
737 [255] |
9cb950276d27
debugrevspec: add option to print parsed tree at given stages
Yuya Nishihara <yuya@tcha.org>
parents:
29905
diff
changeset
|
738 |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
739 verify optimized tree: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
740 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
741 $ hg debugrevspec --verify '0|1' |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
742 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
743 $ 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
|
744 * analyzed: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
745 (and |
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') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
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 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
751 (andsmally |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
752 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
753 (symbol 'r3232') |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
754 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
755 (symbol '2')) |
29924
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
756 * analyzed set: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
757 <baseset [2]> |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
758 * optimized set: |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
759 <baseset [2, 2]> |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
760 --- analyzed |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
761 +++ optimized |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
762 2 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
763 +2 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
764 [1] |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
765 |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
766 $ hg debugrevspec --no-optimized --verify-optimized '0' |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
767 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
|
768 [255] |
45bf56a89197
debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org>
parents:
29923
diff
changeset
|
769 |
24932
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
770 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
|
771 parenthesis. |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
772 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
773 $ 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
|
774 $ 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
|
775 8 |
022282152632
revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
24904
diff
changeset
|
776 9 |
11419 | 777 |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
778 ':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
|
779 may be hidden (issue5385) |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
780 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
781 $ try -p parsed -p analyzed ':' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
782 * parsed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
783 (rangeall |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
784 None) |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
785 * analyzed: |
30803
d389f19f14aa
revset: do not transform range* operators in parsed tree
Yuya Nishihara <yuya@tcha.org>
parents:
30783
diff
changeset
|
786 (rangeall |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
787 None) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
788 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
789 <spanset+ 0:10> |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
790 0 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
791 1 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
792 2 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
793 3 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
794 4 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
795 5 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
796 6 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
797 7 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
798 8 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
799 9 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
800 $ try -p analyzed ':1' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
801 * analyzed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
802 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
803 (symbol '1')) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
804 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
805 <spanset+ 0:2> |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
806 0 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
807 1 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
808 $ try -p analyzed ':(1|2)' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
809 * analyzed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
810 (rangepre |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
811 (or |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
812 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
813 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
814 (symbol '2')))) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
815 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
816 <spanset+ 0:3> |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
817 0 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
818 1 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
819 2 |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
820 $ try -p analyzed ':(1&2)' |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
821 * analyzed: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
822 (rangepre |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
823 (and |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
824 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
825 (symbol '2'))) |
30044
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
826 * set: |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
827 <baseset []> |
69b61d0bb008
revset: do not rewrite ':y' to '0:y' (issue5385)
Yuya Nishihara <yuya@tcha.org>
parents:
29946
diff
changeset
|
828 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
829 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
|
830 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
831 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
|
832 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
833 $ 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
|
834 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
835 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
836 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
837 (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
|
838 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
839 <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
|
840 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
841 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
842 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
843 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
844 $ 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
|
845 (dagrange |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
846 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
847 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
848 (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
|
849 * set: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
850 <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
|
851 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
852 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
853 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
854 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
855 $ try '1^..2' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
856 (dagrange |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
857 (parentpost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
858 (symbol '1')) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
859 (symbol '2')) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
860 * set: |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
861 <baseset+ [0, 1, 2]> |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
862 0 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
863 1 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
864 2 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
865 |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
866 $ try '9^:' |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
867 (rangepost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
868 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
869 (symbol '9'))) |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
870 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
871 <spanset+ 8:10> |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
872 8 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
873 9 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
874 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
875 $ try '9^::' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
876 (dagrangepost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
877 (parentpost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
878 (symbol '9'))) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
879 * set: |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
880 <generatorsetasc+> |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
881 8 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
882 9 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
883 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
884 $ try '9^..' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
885 (dagrangepost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
886 (parentpost |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
887 (symbol '9'))) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
888 * set: |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
889 <generatorsetasc+> |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
890 8 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
891 9 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
892 |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
893 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
|
894 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
895 $ 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
|
896 (parent |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
897 (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
|
898 (group |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
899 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
900 (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
|
901 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
|
902 [255] |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
903 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
904 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
|
905 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
906 $ 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
|
907 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
908 (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
|
909 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
910 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
911 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
912 (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
|
913 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
914 <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
|
915 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
916 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
917 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
918 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
919 $ 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
|
920 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
921 (parentpost |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
922 (group |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
923 (range |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
924 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
925 (symbol '3')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
926 (symbol '4')))) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
927 (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
|
928 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
929 <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
|
930 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
931 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
932 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
933 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
934 $ 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
|
935 (dagrange |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
936 (parentpost |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
937 (group |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
938 (dagrange |
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
939 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
940 (symbol '3')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
941 (symbol '4')))) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
942 (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
|
943 * set: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
944 <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
|
945 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
946 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
947 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
948 |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
949 $ try '(9^:)^:' |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
950 (rangepost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
951 (parentpost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
952 (group |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
953 (rangepost |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
954 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
955 (symbol '9')))))) |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
956 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
957 <spanset+ 4:10> |
29770
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
958 4 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
959 5 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
960 6 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
961 7 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
962 8 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
963 9 |
9c51a5de76db
revset: also parse x^: as (x^):
Yuya Nishihara <yuya@tcha.org>
parents:
29769
diff
changeset
|
964 |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
965 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
|
966 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
967 $ 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
|
968 (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
|
969 * expanded: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
970 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
971 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
972 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
973 (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
|
974 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
975 <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
|
976 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
977 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
978 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
979 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
980 $ 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
|
981 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
982 (symbol 'A') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
983 (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
|
984 * expanded: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
985 (range |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
986 (parentpost |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
987 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
988 (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
|
989 * set: |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
990 <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
|
991 0 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
992 1 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
993 2 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
994 |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
995 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
|
996 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
|
997 |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
998 $ 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
|
999 (parent |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1000 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1001 (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
|
1002 * expanded: |
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
1003 (parent |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1004 (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
|
1005 (rangepre |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1006 (symbol '2'))) |
29769
abe4eecc3253
revset: resolve ambiguity of x^:y before alias expansion
Yuya Nishihara <yuya@tcha.org>
parents:
29768
diff
changeset
|
1007 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
|
1008 [255] |
29768
8e4841944e68
revset: add test for resolution of infix/suffix ambiguity of x^:y
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
1009 |
35542
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1010 '::' itself isn't a valid expression |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1011 |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1012 $ try '::' |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1013 (dagrangeall |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1014 None) |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1015 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
|
1016 [255] |
beb667c9880f
revset: parse x^:: as (x^):: (issue5764)
Yuya Nishihara <yuya@tcha.org>
parents:
35501
diff
changeset
|
1017 |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1018 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
|
1019 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1020 $ 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
|
1021 $ log 'ancestor(1)' |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1022 1 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1023 $ 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
|
1024 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1025 $ 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
|
1026 $ 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
|
1027 0 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1028 $ 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
|
1029 1 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1030 $ 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
|
1031 0 |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1032 $ 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
|
1033 1 |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1034 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1035 test ancestors |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1036 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1037 $ 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
|
1038 @ 9 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1039 o 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1040 | o 7 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1041 | o 6 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1042 |/| |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1043 | o 5 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1044 o | 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1045 | o 3 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1046 o | 2 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1047 |/ |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1048 o 1 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1049 o 0 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1050 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1051 $ 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
|
1052 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1053 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1054 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1055 5 |
18536
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1056 $ log 'ancestor(ancestors(5))' |
ae645d4f084c
revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents:
18473
diff
changeset
|
1057 0 |
24940
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1058 $ log '::r3232()' |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1059 0 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1060 1 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1061 2 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1062 3 |
6b54f749659b
revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24932
diff
changeset
|
1063 |
38624
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1064 test common ancestors |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1065 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1066 $ hg log -T '{rev}\n' -r 'commonancestors(7 + 9)' |
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 |
39799
f28812c708a5
revset: fix commonancestor test so it demonstrates correct behavior
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
38705
diff
changeset
|
1072 $ hg log -T '{rev}\n' -r 'commonancestors(heads(all()))' |
38624
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 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1078 $ hg log -T '{rev}\n' -r 'commonancestors(9)' |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1079 0 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1080 1 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1081 2 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1082 4 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1083 8 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1084 9 |
5460926352ee
revsets: add commonancestors revset
Sean Farley <sean@farley.io>
parents:
38522
diff
changeset
|
1085 |
39800
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1086 $ 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
|
1087 0 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1088 1 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1089 2 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1090 4 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1091 8 |
572cd30eaffb
revset: add test demonstrating a bug with commonancestor()
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39799
diff
changeset
|
1092 |
39804
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1093 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
|
1094 (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
|
1095 |
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(7 + 9))' |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1097 4 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1098 $ 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
|
1099 4 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1100 $ 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
|
1101 9 |
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1102 $ 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
|
1103 8 |
39804
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1104 |
38705
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1105 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
|
1106 |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1107 $ log 'ancestor(none())' |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1108 $ log 'ancestors(none())' |
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1109 $ log 'commonancestors(none())' |
39804
84c61c1593c4
revset: add tests of heads(commonancestors(..))
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
39801
diff
changeset
|
1110 $ log 'heads(commonancestors(none()))' |
38705
e4b270a32ba8
revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org>
parents:
38624
diff
changeset
|
1111 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1112 test ancestors with depth limit |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1113 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1114 (depth=0 selects the node itself) |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1115 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1116 $ log 'reverse(ancestors(9, depth=0))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1117 9 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1118 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1119 (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
|
1120 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1121 $ log 'reverse(ancestors(8:9, depth=1))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1122 9 |
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 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1125 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1126 (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
|
1127 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1128 $ log 'reverse(ancestors(7+8, depth=2))' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1129 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1130 7 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1131 6 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1132 5 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1133 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1134 2 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1135 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1136 (walk example above by separate queries) |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1137 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1138 $ 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
|
1139 8 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1140 4 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1141 2 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1142 7 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1143 6 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1144 5 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1145 |
33003
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1146 (walk 2nd and 3rd ancestors) |
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 $ 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
|
1149 5 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1150 4 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1151 3 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1152 2 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1153 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1154 (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
|
1155 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1156 $ 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
|
1157 5 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1158 4 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1159 2 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1160 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1161 (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
|
1162 '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
|
1163 multiple depths) |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1164 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1165 $ 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
|
1166 5 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1167 2 |
f63d111258da
revset: add startdepth limit to ancestors() as internal option
Yuya Nishihara <yuya@tcha.org>
parents:
33002
diff
changeset
|
1168 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1169 test bad arguments passed to ancestors() |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1170 |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1171 $ log 'ancestors(., depth=-1)' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1172 hg: parse error: negative depth |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1173 [255] |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1174 $ log 'ancestors(., depth=foo)' |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1175 hg: parse error: ancestors expects an integer depth |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1176 [255] |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1177 |
33074
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1178 test descendants |
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 $ 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
|
1181 @ 9 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1182 o 8 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1183 | o 7 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1184 | o 6 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1185 |/| |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1186 | o 5 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1187 o | 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1188 | o 3 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1189 o | 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1190 |/ |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1191 o 1 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1192 o 0 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1193 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1194 (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
|
1195 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1196 $ log 'null:4 & descendants(null)' |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1197 -1 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1198 0 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1199 1 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1200 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1201 3 |
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 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1204 (including merge) |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1205 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1206 $ log ':8 & descendants(2)' |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1207 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1208 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1209 6 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1210 7 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1211 8 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1212 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1213 (multiple roots) |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1214 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1215 $ log ':8 & descendants(2+5)' |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1216 2 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1217 4 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1218 5 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1219 6 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1220 7 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1221 8 |
e999b59d6eb1
test-revset: add a few more tests of descendants()
Yuya Nishihara <yuya@tcha.org>
parents:
33003
diff
changeset
|
1222 |
33080
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1223 test descendants with depth limit |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1224 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1225 (depth=0 selects the node itself) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1226 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1227 $ log 'descendants(0, depth=0)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1228 0 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1229 $ log 'null: & descendants(null, depth=0)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1230 -1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1231 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1232 (p2 = null should be ignored) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1233 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1234 $ log 'null: & descendants(null, depth=2)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1235 -1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1236 0 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1237 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1238 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1239 (multiple paths: depth(6) = (2, 3)) |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1240 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1241 $ log 'descendants(1+3, depth=2)' |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1242 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1243 2 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1244 3 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1245 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1246 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1247 6 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1248 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1249 (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
|
1250 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1251 $ 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
|
1252 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1253 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1254 6 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1255 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1256 (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
|
1257 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1258 $ 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
|
1259 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1260 2 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1261 3 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1262 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1263 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1264 6 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1265 7 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1266 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1267 (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
|
1268 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1269 $ 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
|
1270 1 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1271 2 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1272 3 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1273 4 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1274 5 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1275 7 |
a53bfc2845f2
revset: add depth limit to descendants() (issue5374)
Yuya Nishihara <yuya@tcha.org>
parents:
33075
diff
changeset
|
1276 |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1277 test ancestors/descendants relation subscript: |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1278 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1279 $ log 'tip#generations[0]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1280 9 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1281 $ log '.#generations[-1]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1282 8 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1283 $ log '.#g[(-1)]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1284 8 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1285 |
41359
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1286 $ log '6#generations[0:1]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1287 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1288 7 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1289 $ log '6#generations[-1:1]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1290 4 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1291 5 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1292 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1293 7 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1294 $ log '6#generations[0:]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1295 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1296 7 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1297 $ log '5#generations[:0]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1298 0 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1299 1 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1300 3 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1301 5 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1302 $ log '3#generations[:]' |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1303 0 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1304 1 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1305 3 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1306 5 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1307 6 |
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1308 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
|
1309 $ log 'tip#generations[1:-1]' |
41359
431cf2c8c839
revset: support ranges in #generations relation
Anton Shestakov <av6@dwimlabs.net>
parents:
41276
diff
changeset
|
1310 |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1311 $ hg debugrevspec -p parsed 'roots(:)#g[2]' |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1312 * parsed: |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1313 (relsubscript |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1314 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1315 (symbol 'roots') |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1316 (rangeall |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1317 None)) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1318 (symbol 'g') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1319 (symbol '2')) |
33417
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1320 2 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1321 3 |
d1b13d4995ed
revset: add experimental ancestors/descendants relation subscript
Yuya Nishihara <yuya@tcha.org>
parents:
33416
diff
changeset
|
1322 |
33002
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1323 test author |
272a44cac57e
revset: add depth limit to ancestors()
Yuya Nishihara <yuya@tcha.org>
parents:
32914
diff
changeset
|
1324 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1325 $ 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
|
1326 2 |
16823
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1327 $ 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
|
1328 0 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1329 1 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1330 2 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1331 3 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1332 4 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1333 5 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1334 6 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1335 7 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1336 8 |
b23bacb230c9
revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents:
16821
diff
changeset
|
1337 9 |
30782
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1338 $ log 'author(r"re:\S")' |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1339 0 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1340 1 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1341 2 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1342 3 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1343 4 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1344 5 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1345 6 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1346 7 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1347 8 |
db38cfc7c29d
revset: stop lowercasing the regex pattern for 'author'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30701
diff
changeset
|
1348 9 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1349 $ log 'branch(é)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1350 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1351 9 |
16821
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1352 $ log 'branch(a)' |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1353 0 |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1354 $ 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
|
1355 0 a |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1356 2 a-b-c- |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1357 3 +a+b+c+ |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1358 4 -a-b-c- |
16851
c739227b5eea
test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16824
diff
changeset
|
1359 5 !a/b/c/ |
16821
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1360 6 _a_b_c_ |
0946502fd3d5
revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents:
16820
diff
changeset
|
1361 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
|
1362 $ 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
|
1363 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1364 3 |
30699
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1365 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1366 $ log 'children(4)' |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1367 6 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1368 8 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1369 $ log 'children(null)' |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1370 0 |
5bda147c3139
revset: make children() not look at p2 if null (issue5439)
Yuya Nishihara <yuya@tcha.org>
parents:
30332
diff
changeset
|
1371 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1372 $ log 'closed()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1373 $ 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
|
1374 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1375 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1376 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1377 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
|
1378 $ 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
|
1379 0 |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1380 1 |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1381 3 |
760151697a4f
revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19706
diff
changeset
|
1382 5 |
14650
93731b3efd0d
revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents:
14153
diff
changeset
|
1383 $ log 'desc(B)' |
93731b3efd0d
revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents:
14153
diff
changeset
|
1384 5 |
30783
931a60880df4
revset: add regular expression support to 'desc'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30782
diff
changeset
|
1385 $ 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
|
1386 5 5 bug |
931a60880df4
revset: add regular expression support to 'desc'
Matt Harbison <matt_harbison@yahoo.com>
parents:
30782
diff
changeset
|
1387 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
|
1388 $ 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
|
1389 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1390 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1391 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1392 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1393 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1394 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1395 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1396 9 |
16411
4c2edcd84175
graphlog: correctly handle calls in subdirectories
Patrick Mezard <patrick@mezard.eu>
parents:
16218
diff
changeset
|
1397 $ 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
|
1398 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1399 4 |
20288
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1400 $ log 'filelog("b")' |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1401 1 |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1402 4 |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1403 $ 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
|
1404 1 |
b61ad01c4e73
revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20286
diff
changeset
|
1405 4 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1406 $ log 'follow()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1407 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1408 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1409 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1410 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1411 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1412 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1413 $ 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
|
1414 6 |
12321 | 1415 $ try 'grep("(")' # invalid regular expression |
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 '(')) |
36583
edf736c3c064
tests: add some re and globs for test-revset on python3
Augie Fackler <augie@google.com>
parents:
36582
diff
changeset
|
1419 hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \),.*) (re) |
12321 | 1420 [255] |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1421 $ try 'grep("\bissue\d+")' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
1422 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1423 (symbol 'grep') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1424 (string '\x08issue\\d+')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1425 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1426 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1427 <fullreposet+ 0:10>, |
28424
534f968d33e5
revset: add inspection data to all filter() calls
Yuya Nishihara <yuya@tcha.org>
parents:
28423
diff
changeset
|
1428 <grep '\x08issue\\d+'>> |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1429 $ try 'grep(r"\bissue\d+")' |
16218
81a1a00f5738
debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents:
16096
diff
changeset
|
1430 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1431 (symbol 'grep') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1432 (string '\\bissue\\d+')) |
24458
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1433 * set: |
7d87f672d069
debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents:
24419
diff
changeset
|
1434 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1435 <fullreposet+ 0:10>, |
28424
534f968d33e5
revset: add inspection data to all filter() calls
Yuya Nishihara <yuya@tcha.org>
parents:
28423
diff
changeset
|
1436 <grep '\\bissue\\d+'>> |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1437 6 |
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1438 $ try 'grep(r"\")' |
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1439 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
|
1440 (grep(r"\") |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
1441 ^ here) |
12408
78a97859b90d
revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents:
12321
diff
changeset
|
1442 [255] |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1443 $ log 'head()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1444 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1445 1 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1446 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1447 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1448 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1449 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1450 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 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1452 9 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1453 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1454 Test heads |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1455 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1456 $ 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
|
1457 7 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1458 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1459 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
|
1460 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1461 $ 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
|
1462 * set: |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1463 <filteredset |
41274
4c6fdc7e2e7d
revset: inline parents computation to reuse the input argument
Boris Feld <boris.feld@octobus.net>
parents:
40931
diff
changeset
|
1464 <baseset [9]>, |
41276
5affe1583e1d
revset: use changelog's `headrevs` method to compute heads
Boris Feld <boris.feld@octobus.net>
parents:
41274
diff
changeset
|
1465 <baseset+ [7, 9]>> |
38478
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 |
38479
72621094505f
revset: fix heads() order to always follow the input set (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
38478
diff
changeset
|
1468 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
|
1469 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1470 $ log 'heads(all())' |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1471 7 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1472 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1473 $ 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
|
1474 7 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1475 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1476 $ 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
|
1477 9 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1478 7 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1479 $ 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
|
1480 9 |
38478
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
diff
changeset
|
1481 7 |
b2d5ad03f31a
test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org>
parents:
38261
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 'keyword(issue)' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1484 6 |
19706
26ddce1a2a55
revset: fix wrong keyword() behaviour for strings with spaces
Alexander Plavin <alexander@plav.in>
parents:
18955
diff
changeset
|
1485 $ 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
|
1486 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1487 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
|
1488 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1489 $ 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
|
1490 0 |
26638
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"), 3, 5)' |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1492 5 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1493 6 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1494 7 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1495 $ 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
|
1496 6 |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1497 $ 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
|
1498 $ log 'limit(all(), 1, -1)' |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1499 hg: parse error: negative offset |
7afaf2566e25
revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org>
parents:
26537
diff
changeset
|
1500 [255] |
32799
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1501 $ log 'limit(all(), -1)' |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1502 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
|
1503 [255] |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1504 $ log 'limit(all(), 0)' |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1505 |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1506 $ log 'last(all(), -1)' |
b36ec65ea583
revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org>
parents:
32798
diff
changeset
|
1507 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
|
1508 [255] |
32798
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1509 $ 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
|
1510 $ 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
|
1511 9 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1512 $ 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
|
1513 8 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1514 9 |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1515 |
32819
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1516 Test smartset.slice() by first/last() |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1517 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1518 (using unoptimized set, filteredset as example) |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1519 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1520 $ 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
|
1521 * set: |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1522 <filteredset |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1523 <spanset+ 0:8>, |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1524 <branch 're:'>> |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1525 $ log 'limit(0:7 & branch("re:"), 3, 4)' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1526 4 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1527 5 |
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 $ log 'limit(7:0 & branch("re:"), 3, 4)' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1530 3 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1531 2 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1532 1 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1533 $ log 'last(0:7 & branch("re:"), 2)' |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1534 6 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1535 7 |
4710cc4dac99
smartset: extract method to slice abstractsmartset
Yuya Nishihara <yuya@tcha.org>
parents:
32817
diff
changeset
|
1536 |
32820
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1537 (using baseset) |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1538 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1539 $ 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
|
1540 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1541 <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
|
1542 $ 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
|
1543 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1544 <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
|
1545 $ 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
|
1546 4 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1547 5 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1548 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1549 $ 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
|
1550 4 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1551 5 |
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 $ 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
|
1554 3 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1555 2 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1556 1 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1557 $ 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
|
1558 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1559 7 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1560 $ 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
|
1561 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1562 <baseset+ [6, 7]> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1563 6 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1564 7 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1565 $ 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
|
1566 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1567 <baseset+ []> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1568 $ 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
|
1569 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1570 <baseset- [0, 1]> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1571 1 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1572 0 |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1573 $ 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
|
1574 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1575 <baseset- []> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1576 $ 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
|
1577 * set: |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1578 <baseset+ []> |
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
1579 |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1580 (using spanset) |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1581 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1582 $ 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
|
1583 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1584 <spanset+ 0:8> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1585 $ 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
|
1586 4 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1587 5 |
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 $ 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
|
1590 3 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1591 2 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1592 1 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1593 $ 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
|
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 $ 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
|
1597 1 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1598 0 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1599 $ log 'last(0:7, 2)' |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1600 6 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1601 7 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1602 $ 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
|
1603 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1604 <spanset+ 6:8> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1605 6 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1606 7 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1607 $ 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
|
1608 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1609 <spanset+ 8:8> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1610 $ 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
|
1611 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1612 <spanset- 0:2> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1613 1 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1614 0 |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1615 $ 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
|
1616 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1617 <spanset- 0:0> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1618 $ 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
|
1619 * set: |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1620 <spanset+ 0:0> |
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1621 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1622 Test order of first/last revisions |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1623 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1624 $ 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
|
1625 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1626 <filteredset |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1627 <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
|
1628 <spanset+ 3:10>> |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1629 4 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1630 3 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1631 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1632 $ 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
|
1633 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1634 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1635 <spanset+ 3:10>, |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1636 <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
|
1637 3 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1638 4 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1639 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1640 $ 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
|
1641 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1642 <filteredset |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1643 <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
|
1644 <spanset+ 0:2>> |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1645 1 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1646 0 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1647 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1648 $ 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
|
1649 * set: |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1650 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
1651 <spanset+ 0:2>, |
32821
9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
Yuya Nishihara <yuya@tcha.org>
parents:
32820
diff
changeset
|
1652 <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
|
1653 0 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1654 1 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1655 |
33109
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1656 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
|
1657 |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1658 $ 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
|
1659 * set: |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1660 <baseset slice=0:1 |
35501
12a46ad67a3c
smartset: split generatorset classes to avoid cycle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34866
diff
changeset
|
1661 <generatorsetasc->> |
33109
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1662 9 |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1663 $ 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
|
1664 9 |
247bae545061
smartset: fix generatorset.last() to not return the first element (issue5609)
Yuya Nishihara <yuya@tcha.org>
parents:
33097
diff
changeset
|
1665 |
32798
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1666 Test matching |
573b792872c1
revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
32699
diff
changeset
|
1667 |
16447
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1668 $ log 'matching(6)' |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1669 6 |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1670 $ 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
|
1671 6 |
60c379da12aa
tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
16415
diff
changeset
|
1672 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
|
1673 |
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 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
|
1675 |
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 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
|
1677 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1678 $ 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
|
1679 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
|
1680 |
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 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
|
1682 |
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 $ 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
|
1684 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
|
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 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
|
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 $ 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
|
1689 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1690 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
|
1691 |
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 $ 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
|
1693 |
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 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
|
1695 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1696 $ 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
|
1697 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
|
1698 |
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 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
|
1700 |
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 $ 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
|
1702 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
|
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 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
|
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 $ 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
|
1707 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1708 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
|
1709 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1710 $ 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
|
1711 |
876c17336b4e
revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20862
diff
changeset
|
1712 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1713 $ log 'merge()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1714 6 |
17753
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
1715 $ log 'branchpoint()' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
1716 1 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
1717 4 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
1718 $ 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
|
1719 4 |
16521
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1720 $ log 'modifies("path:b")' |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1721 4 |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1722 $ log 'modifies("*")' |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1723 4 |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1724 6 |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1725 $ log 'modifies("set:modified()")' |
592701c8eac6
revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents:
16447
diff
changeset
|
1726 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
|
1727 $ 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
|
1728 2 |
20613 | 1729 $ log 'only(9)' |
1730 8 | |
1731 9 | |
1732 $ log 'only(8)' | |
1733 8 | |
1734 $ log 'only(9, 5)' | |
1735 2 | |
1736 4 | |
1737 8 | |
1738 9 | |
1739 $ log 'only(7 + 9, 5 + 2)' | |
1740 4 | |
1741 6 | |
1742 7 | |
1743 8 | |
1744 9 | |
21925
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1745 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1746 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
|
1747 $ 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
|
1748 $ 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
|
1749 0 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1750 1 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1751 2 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1752 4 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1753 8 |
7142e04b438e
revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents:
21893
diff
changeset
|
1754 9 |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1755 |
23765
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1756 Test '%' operator |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1757 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1758 $ log '9%' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1759 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1760 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1761 $ log '9%5' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1762 2 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1763 4 |
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 $ log '(7 + 9)%(5 + 2)' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1767 4 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1768 6 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1769 7 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1770 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1771 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1772 |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30179
diff
changeset
|
1773 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
|
1774 |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1775 $ 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
|
1776 (onlypost |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1777 (minus |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1778 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1779 (symbol '8') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1780 (symbol '9')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1781 (symbol '8'))) |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1782 * optimized: |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1783 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1784 (symbol 'only') |
28217
d2ac8b57a75d
revset: use smartset minus operator
Durham Goode <durham@fb.com>
parents:
28015
diff
changeset
|
1785 (difference |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1786 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1787 (symbol '8') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1788 (symbol '9')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1789 (symbol '8'))) |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1790 * set: |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1791 <baseset+ [8, 9]> |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1792 8 |
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1793 9 |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1794 $ try --optimize '(9)%(5)' |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1795 (only |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1796 (group |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1797 (symbol '9')) |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1798 (group |
34073
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 * optimized: |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1801 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1802 (symbol 'only') |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1803 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1804 (symbol '9') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
1805 (symbol '5'))) |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1806 * set: |
28785
87b89dca669d
revset: stabilize repr of baseset initialized with a set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28690
diff
changeset
|
1807 <baseset+ [2, 4, 8, 9]> |
25105
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1808 2 |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1809 4 |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1810 8 |
2f34746c27df
revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents:
25102
diff
changeset
|
1811 9 |
25094
8b99e9a8db05
revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents:
24904
diff
changeset
|
1812 |
23765
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1813 Test the order of operations |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1814 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1815 $ log '7 + 9%5 + 2' |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1816 7 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1817 2 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1818 4 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1819 8 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1820 9 |
537a2669a113
revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents:
23742
diff
changeset
|
1821 |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1822 Test explicit numeric revision |
23954
310222feb9a8
revset: allow rev(-1) to indicate null revision (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23846
diff
changeset
|
1823 $ 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
|
1824 $ log 'rev(-1)' |
23954
310222feb9a8
revset: allow rev(-1) to indicate null revision (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23846
diff
changeset
|
1825 -1 |
23062
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1826 $ 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
|
1827 0 |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1828 $ 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
|
1829 9 |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1830 $ 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
|
1831 $ 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
|
1832 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
|
1833 [255] |
ba89f7b542c9
revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents:
22861
diff
changeset
|
1834 |
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
|
1835 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
|
1836 $ log 'id(2)' |
38855
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1837 $ log 'id(5)' |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1838 2 |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1839 $ 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
|
1840 2 |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1841 $ 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
|
1842 2 |
7848f284b211
revisions: allow "x123" to refer to nodeid prefix "123"
Martin von Zweigbergk <martinvonz@google.com>
parents:
38705
diff
changeset
|
1843 $ 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
|
1844 $ 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
|
1845 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
|
1846 [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
|
1847 $ 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
|
1848 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
|
1849 $ 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
|
1850 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
|
1851 $ 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
|
1852 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
|
1853 $ 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
|
1854 $ 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
|
1855 $ 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
|
1856 $ 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
|
1857 $ 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
|
1858 $ 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
|
1859 |
23956
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1860 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
|
1861 $ log '(null)' |
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 '(0:null)' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1867 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1868 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1869 $ log 'null::0' |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1870 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1871 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1872 $ 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
|
1873 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1874 $ 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
|
1875 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1876 $ 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
|
1877 -1 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1878 0 |
23956
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1879 $ log 'ancestors(null)' |
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1880 -1 |
24204
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1881 $ 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
|
1882 0 |
d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents:
24202
diff
changeset
|
1883 -1 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1884 $ log 'first(null:)' |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1885 -1 |
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1886 $ log 'min(null:)' |
25265
e16456831516
revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents:
25094
diff
changeset
|
1887 BROKEN: should be '-1' |
24202
2de9ee016425
revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents:
24175
diff
changeset
|
1888 $ log 'tip:null and all()' | tail -2 |
2de9ee016425
revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents:
24175
diff
changeset
|
1889 1 |
2de9ee016425
revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents:
24175
diff
changeset
|
1890 0 |
23956
b1e026c25552
revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents:
23954
diff
changeset
|
1891 |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1892 Test working-directory revision |
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1893 $ hg debugrevspec 'wdir()' |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1894 2147483647 |
32404
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1895 $ hg debugrevspec 'wdir()^' |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1896 9 |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1897 $ hg up 7 |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1898 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
|
1899 $ hg debugrevspec 'wdir()^' |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1900 7 |
32437
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1901 $ 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
|
1902 2147483647 |
32441
018f638ad88e
revset: add support for using ~ operator on wdir() predicate
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32440
diff
changeset
|
1903 $ hg debugrevspec 'wdir()~3' |
018f638ad88e
revset: add support for using ~ operator on wdir() predicate
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32440
diff
changeset
|
1904 5 |
32442
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1905 $ hg debugrevspec 'ancestors(wdir())' |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1906 0 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1907 1 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1908 2 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1909 3 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1910 4 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1911 5 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1912 6 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1913 7 |
4dd292cec3ad
revset: add support for ancestors(wdir())
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32441
diff
changeset
|
1914 2147483647 |
38522
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1915 $ hg debugrevspec '0:wdir() & ancestor(wdir())' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1916 2147483647 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1917 $ hg debugrevspec '0:wdir() & ancestor(.:wdir())' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1918 4 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1919 $ hg debugrevspec '0:wdir() & ancestor(wdir(), wdir())' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1920 2147483647 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1921 $ hg debugrevspec '0:wdir() & ancestor(wdir(), tip)' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1922 4 |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1923 $ hg debugrevspec 'null:wdir() & ancestor(wdir(), null)' |
54d7aaa243cc
revset: add partial support for ancestor(wdir())
Yuya Nishihara <yuya@tcha.org>
parents:
38479
diff
changeset
|
1924 -1 |
32437
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1925 $ 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
|
1926 2147483647 |
f03dcb3f95a5
tests: add tests for predicates and operators which works with wdir()
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32436
diff
changeset
|
1927 $ 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
|
1928 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
|
1929 $ 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
|
1930 $ 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
|
1931 7 |
32436
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1932 $ hg debugrevspec 'wdir()^1' |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1933 7 |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1934 $ hg debugrevspec 'wdir()^2' |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1935 $ hg debugrevspec 'wdir()^3' |
f064e2f72c49
revset: add support for "wdir()^n"
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32404
diff
changeset
|
1936 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
|
1937 [255] |
32404
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1938 For tests consistency |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1939 $ hg up 9 |
e8c043375b53
revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
1940 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
|
1941 $ 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
|
1942 9 |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1943 2147483647 |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1944 $ 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
|
1945 $ 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
|
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 9 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1948 2147483647 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1949 $ 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
|
1950 2147483647 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1951 9 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1952 8 |
d51dac68ec98
revset: work around x:y range where x or y is wdir()
Yuya Nishihara <yuya@tcha.org>
parents:
25765
diff
changeset
|
1953 $ 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
|
1954 2147483647 |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1955 $ log '(all() + wdir()) & min(. + wdir())' |
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1956 9 |
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1957 $ log '(all() + wdir()) & max(. + wdir())' |
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1958 2147483647 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1959 $ log 'first(wdir() + .)' |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1960 2147483647 |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
1961 $ log 'last(. + wdir())' |
25765
5e1b0739611c
revset: use integer representation of wdir() in revset
Yuya Nishihara <yuya@tcha.org>
parents:
25706
diff
changeset
|
1962 2147483647 |
24419
0e41f110e69e
revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents:
24222
diff
changeset
|
1963 |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1964 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
|
1965 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1966 $ hg debugrevspec '2147483647' |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1967 2147483647 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1968 $ hg debugrevspec 'rev(2147483647)' |
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1969 2147483647 |
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1970 $ hg debugrevspec 'ffffffffffffffffffffffffffffffffffffffff' |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1971 2147483647 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1972 $ hg debugrevspec 'ffffffffffff' |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1973 2147483647 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1974 $ hg debugrevspec 'id(ffffffffffffffffffffffffffffffffffffffff)' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1975 2147483647 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1976 $ hg debugrevspec 'id(ffffffffffff)' |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
1977 2147483647 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1978 $ hg debugrevspec 'ffffffffffff+000000000000' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1979 2147483647 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
1980 -1 |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1981 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1982 $ cd .. |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1983 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1984 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
|
1985 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1986 $ hg init wdir-hashcollision |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1987 $ cd wdir-hashcollision |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1988 $ cat <<EOF >> .hg/hgrc |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1989 > [experimental] |
34866
1644623ab096
config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents:
34126
diff
changeset
|
1990 > evolution.createmarkers=True |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1991 > EOF |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1992 $ echo 0 > a |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1993 $ hg ci -qAm 0 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1994 $ 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
|
1995 > hg up -q 0 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1996 > echo $i > a |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1997 > hg ci -qm $i |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1998 > done |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
1999 $ hg up -q null |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2000 $ 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
|
2001 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a b4e |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2002 1:fffbae3886c8fbb2114296380d276fd37715d571 fffba |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2003 2:fffb6093b00943f91034b9bdad069402c834e572 fffb6 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2004 3:fff48a9b9de34a4d64120c29548214c67980ade3 fff4 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2005 4:ffff85cff0ff78504fcdc3c0bc10de0c65379249 ffff8 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2006 2147483647:ffffffffffffffffffffffffffffffffffffffff fffff |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2007 $ hg debugobsolete fffbae3886c8fbb2114296380d276fd37715d571 |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33417
diff
changeset
|
2008 obsoleted 1 changesets |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2009 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
2010 $ hg debugrevspec 'fff' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2011 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
|
2012 [255] |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
2013 $ hg debugrevspec 'ffff' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2014 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
|
2015 [255] |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
2016 $ hg debugrevspec 'fffb' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2017 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
|
2018 [255] |
37867
0a79fb64118e
revset: use resolvehexnodeidprefix() in id() predicate (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
37866
diff
changeset
|
2019 BROKEN should be '2' (node lookup uses unfiltered repo) |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
2020 $ hg debugrevspec 'id(fffb)' |
37867
0a79fb64118e
revset: use resolvehexnodeidprefix() in id() predicate (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
37866
diff
changeset
|
2021 BROKEN should be '2' (node lookup uses unfiltered repo) |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
2022 $ hg debugrevspec 'ffff8' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2023 4 |
42264
6bc1245cd598
revset: populate wdir() by its hash or revision number
Yuya Nishihara <yuya@tcha.org>
parents:
41738
diff
changeset
|
2024 $ hg debugrevspec 'fffff' |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2025 2147483647 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2026 |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2027 $ cd .. |
32661
a3064fe3e495
revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org>
parents:
32462
diff
changeset
|
2028 |
32683
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2029 Test branch() with wdir() |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2030 |
32684
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2031 $ cd repo |
af854b1b36f8
revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org>
parents:
32683
diff
changeset
|
2032 |
32683
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2033 $ log '0:wdir() & branch("literal:é")' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2034 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2035 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2036 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2037 $ log '0:wdir() & branch("re:é")' |
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 $ 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
|
2042 0 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2043 2 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2044 $ log '0:wdir() & branch(8)' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2045 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2046 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2047 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2048 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2049 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
|
2050 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
|
2051 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2052 $ log 'branch(wdir())' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2053 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2054 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2055 $ log '0:wdir() & branch(wdir())' |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2056 8 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2057 9 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2058 2147483647 |
9f840d99054c
revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org>
parents:
32661
diff
changeset
|
2059 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2060 $ log 'outgoing()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2061 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2062 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2063 $ 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
|
2064 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2065 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2066 $ 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
|
2067 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2068 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2069 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2070 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2071 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2072 $ 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
|
2073 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2074 $ 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
|
2075 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2076 $ 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
|
2077 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2078 5 |
42441
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2079 |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2080 $ hg merge 7 |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2081 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2082 (branch merge, don't forget to commit) |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2083 $ log '0:wdir() & merge()' |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2084 6 |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2085 2147483647 |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2086 $ hg update -qC . |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2087 $ log '0:wdir() & merge()' |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2088 6 |
43c8f72184f4
revset: fix merge() to fall back to changectx API if wdir specified
Yuya Nishihara <yuya@tcha.org>
parents:
42267
diff
changeset
|
2089 |
17753
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2090 $ log 'p1(branchpoint())' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2091 0 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2092 2 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2093 $ log 'p2(branchpoint())' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2094 $ log 'parents(branchpoint())' |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2095 0 |
69d5078d760d
revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents:
17100
diff
changeset
|
2096 2 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2097 $ 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
|
2098 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2099 6 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2100 $ 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
|
2101 0 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2102 $ 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
|
2103 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2104 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2105 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2106 2 |
17100
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2107 $ log 'reverse(all())' |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2108 9 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2109 8 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2110 7 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2111 6 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2112 5 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2113 4 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2114 3 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2115 2 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2116 1 |
ee2370d866fc
revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents:
16851
diff
changeset
|
2117 0 |
23826
c90d195320c5
revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents:
23062
diff
changeset
|
2118 $ 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
|
2119 4 |
c90d195320c5
revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents:
23062
diff
changeset
|
2120 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
|
2121 $ 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
|
2122 5 |
12105
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2123 $ 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
|
2124 7 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2125 8 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2126 9 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2127 $ 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
|
2128 2 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2129 3 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2130 5 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2131 4 |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2132 $ log 'tagged()' |
6f58430dfdd0
util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12103
diff
changeset
|
2133 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
|
2134 $ 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
|
2135 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
|
2136 $ 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
|
2137 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
|
2138 $ 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
|
2139 9 |
16820
20f55613fb2a
revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents:
16778
diff
changeset
|
2140 |
29139
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2141 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
|
2142 ---------------------------------------------- |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2143 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2144 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
|
2145 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
|
2146 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
|
2147 |
29139
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2148 '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
|
2149 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2150 $ log '2:0 & 0::2' |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2151 2 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2152 1 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2153 0 |
64c1955a0461
revset: make dagrange preserve order of input set
Yuya Nishihara <yuya@tcha.org>
parents:
29059
diff
changeset
|
2154 |
29408
785cadec2091
revset: make head() honor order of subset
Martin von Zweigbergk <martinvonz@google.com>
parents:
29390
diff
changeset
|
2155 '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
|
2156 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2157 $ log '2:0 & head()' |
29408
785cadec2091
revset: make head() honor order of subset
Martin von Zweigbergk <martinvonz@google.com>
parents:
29390
diff
changeset
|
2158 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2159 1 |
29408
785cadec2091
revset: make head() honor order of subset
Martin von Zweigbergk <martinvonz@google.com>
parents:
29390
diff
changeset
|
2160 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2161 |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2162 '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
|
2163 |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2164 $ 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
|
2165 * optimized: |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2166 (difference |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2167 (and |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2168 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2169 (symbol '3') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2170 (symbol '0')) |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2171 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2172 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2173 (symbol '3'))) |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
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 '1'))) |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2177 * set: |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2178 <filteredset |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2179 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2180 <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
|
2181 <spanset+ 0:4>>, |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2182 <not |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2183 <spanset+ 1:3>>> |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2184 3 |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2185 0 |
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2186 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2187 '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
|
2188 the left expression: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2189 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2190 $ 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
|
2191 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2192 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2193 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2194 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2195 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2196 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2197 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2198 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2199 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2200 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2201 * optimized: |
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 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2207 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2208 (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
|
2209 * set: |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2210 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2211 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2212 <baseset [0, 1, 2]>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2213 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2214 1 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2215 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2216 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2217 '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
|
2218 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2219 $ 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
|
2220 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2221 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2222 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2223 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2224 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2225 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2226 (list |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2227 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2228 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2229 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2230 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2231 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2232 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2233 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2234 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2235 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2236 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2237 (list |
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
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 '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2240 (symbol '1')) |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2241 (symbol '2')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2242 * set: |
29934
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2243 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2244 <spanset- 0:3>, |
29934
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2245 <addset |
34010
72b5f4d53c58
revset: drop optimization about reordering "or" set elements
Jun Wu <quark@fb.com>
parents:
33868
diff
changeset
|
2246 <spanset+ 0:2>, |
72b5f4d53c58
revset: drop optimization about reordering "or" set elements
Jun Wu <quark@fb.com>
parents:
33868
diff
changeset
|
2247 <baseset [2]>>> |
29934
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2248 2 |
2c6a05b938d8
revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29932
diff
changeset
|
2249 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2250 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2251 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2252 '_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
|
2253 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2254 $ 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
|
2255 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2256 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2257 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2258 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2259 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2260 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2261 (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
|
2262 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2263 (andsmally |
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2264 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2265 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2266 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2267 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2268 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2269 (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
|
2270 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2271 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2272 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2273 <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
|
2274 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2275 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2276 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2277 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2278 $ 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
|
2279 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2280 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2281 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2282 (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
|
2283 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2284 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2285 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2286 * optimized: |
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 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2289 (symbol '_intlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2290 (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
|
2291 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2292 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2293 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2294 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2295 <filteredset |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2296 <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
|
2297 <spanset- 0:3>> |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2298 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2299 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2300 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2301 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2302 '_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
|
2303 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2304 $ 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
|
2305 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2306 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2307 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2308 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2309 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2310 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2311 (string '*'))) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2312 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2313 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2314 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2315 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2316 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2317 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2318 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2319 (string '*'))) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2320 * set: |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2321 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2322 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2323 <baseset [0, 1, 2]>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2324 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2325 1 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2326 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2327 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2328 $ 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
|
2329 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2330 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2331 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2332 (string '*')) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2333 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2334 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2335 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2336 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2337 (andsmally |
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2338 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2339 (symbol '_hexlist') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2340 (string '*')) (glob) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2341 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2342 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2343 (symbol '0'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2344 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2345 <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
|
2346 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2347 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2348 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2349 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2350 '_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
|
2351 matter: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2352 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2353 $ 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
|
2354 * optimized: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2355 (difference |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2356 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2357 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2358 (symbol '0')) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2359 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2360 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2361 (string '0\x001'))) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2362 * set: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2363 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2364 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2365 <not |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2366 <baseset [0, 1]>>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2367 2 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2368 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2369 $ 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
|
2370 * optimized: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2371 (difference |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2372 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2373 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2374 (symbol '0')) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2375 (and |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2376 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2377 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2378 (symbol '2')) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2379 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2380 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2381 (string '0\x001')))) |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2382 * set: |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2383 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2384 <spanset- 0:3>, |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2385 <not |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2386 <baseset [0, 1]>>> |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2387 2 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2388 |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2389 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
|
2390 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
|
2391 |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2392 $ 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
|
2393 * optimized: |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2394 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2395 (symbol 'present') |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2396 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2397 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2398 (string '2\x000\x001'))) |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2399 * set: |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2400 <baseset [2, 0, 1]> |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2401 2 |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2402 0 |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2403 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2404 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2405 $ 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
|
2406 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2407 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2408 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2409 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2410 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2411 (symbol 'present') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2412 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2413 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2414 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2415 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2416 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2417 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2418 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2419 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2420 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2421 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2422 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2423 (symbol 'present') |
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 '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2426 (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
|
2427 * set: |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2428 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2429 <spanset- 0:3>, |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2430 <baseset [0, 1, 2]>> |
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2431 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2432 1 |
29943
80c86b9bb40b
revset: forward ordering requirement to argument of present()
Yuya Nishihara <yuya@tcha.org>
parents:
29935
diff
changeset
|
2433 0 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2434 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2435 '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
|
2436 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2437 $ 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
|
2438 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2439 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2440 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2441 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2442 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2443 (symbol 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2444 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2445 (symbol 'all') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2446 None))) |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2447 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2448 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2449 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2450 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2451 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2452 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2453 (symbol 'reverse') |
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 'all') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
2456 None))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2457 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2458 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2459 <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
|
2460 <spanset+ 0:10>> |
29945
89dbae952ec1
revset: make reverse() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29944
diff
changeset
|
2461 0 |
89dbae952ec1
revset: make reverse() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29944
diff
changeset
|
2462 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2463 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2464 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2465 '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
|
2466 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2467 $ 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
|
2468 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2469 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2470 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2471 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2472 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2473 (symbol 'sort') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2474 (list |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2475 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2476 (symbol 'all') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2477 None) |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2478 (negate |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2479 (symbol 'rev'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2480 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2481 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2482 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2483 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2484 (symbol '2')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2485 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2486 (symbol 'sort') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2487 (list |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2488 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2489 (symbol 'all') |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
2490 None) |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2491 (string '-rev')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2492 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2493 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2494 <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
|
2495 <spanset+ 0:10>> |
29946
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2496 0 |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2497 1 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2498 2 |
29946
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2499 |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2500 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
|
2501 |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2502 $ log '0:2 & sort()' |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2503 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
|
2504 [255] |
285a8c3e53f2
revset: make sort() noop depending on ordering requirement (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29945
diff
changeset
|
2505 $ 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
|
2506 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
|
2507 [255] |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2508 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2509 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
|
2510 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2511 $ 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
|
2512 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2513 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2514 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2515 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2516 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2517 (symbol 'first') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2518 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2519 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2520 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2521 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2522 (symbol '2'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2523 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2524 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2525 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2526 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2527 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2528 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2529 (symbol 'first') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2530 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2531 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2532 (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
|
2533 * set: |
32800
3e6f9bff7e3f
revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org>
parents:
32799
diff
changeset
|
2534 <filteredset |
32820
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
2535 <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
|
2536 <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
|
2537 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2538 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2539 $ 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
|
2540 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2541 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2542 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2543 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2544 (not |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2545 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2546 (symbol 'last') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2547 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2548 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2549 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2550 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2551 (symbol '1')))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2552 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2553 (difference |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2554 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2555 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2556 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2557 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2558 (symbol 'last') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2559 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2560 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2561 (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
|
2562 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2563 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2564 <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
|
2565 <not |
32820
653d60455dbe
smartset: micro optimize baseset.slice() to use slice of list
Yuya Nishihara <yuya@tcha.org>
parents:
32819
diff
changeset
|
2566 <baseset [1]>>> |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2567 2 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2568 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2569 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2570 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
|
2571 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2572 $ 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
|
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 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2579 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2580 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2581 (symbol '1') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2582 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2583 (symbol '2')))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2584 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2585 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2586 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2587 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2588 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2589 (symbol '1')))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2590 * optimized: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2591 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2592 (range |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2593 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2594 (symbol '0')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2595 (range |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2596 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2597 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2598 (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
|
2599 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2600 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2601 (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
|
2602 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2603 <filteredset |
32817
e962c70c0aad
smartset: change repr of spanset to show revisions as half-open range
Yuya Nishihara <yuya@tcha.org>
parents:
32801
diff
changeset
|
2604 <spanset- 0:3>, |
29944
5f56a3b9675e
revset: fix order of nested 'range' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29943
diff
changeset
|
2605 <baseset [1]>> |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2606 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2607 |
34011
1b28525e6698
revset: remove order information from tree (API)
Jun Wu <quark@fb.com>
parents:
34010
diff
changeset
|
2608 '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
|
2609 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2610 $ 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
|
2611 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2612 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2613 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2614 (string 'glob:*')) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2615 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2616 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2617 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2618 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2619 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2620 (symbol '1'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2621 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2622 (andsmally |
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2623 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2624 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2625 (string 'glob:*')) |
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 '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2628 (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
|
2629 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2630 <filteredset |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2631 <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
|
2632 <contains 'glob:*'>> |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2633 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2634 1 |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2635 2 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2636 |
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2637 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
|
2638 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
|
2639 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2640 $ 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
|
2641 (and |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
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 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2644 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2645 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2646 (string 'glob:*'))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2647 (group |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2648 (or |
29929
b3845cab4ddc
revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org>
parents:
29924
diff
changeset
|
2649 (list |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2650 (symbol '0') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2651 (symbol '2') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2652 (symbol '1'))))) |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2653 * optimized: |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2654 (andsmally |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2655 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2656 (symbol 'reverse') |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2657 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2658 (symbol 'contains') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2659 (string 'glob:*'))) |
34020
37b82485097f
revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com>
parents:
34011
diff
changeset
|
2660 (func |
34073
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2661 (symbol '_list') |
7bbc4e113e5f
parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents:
34065
diff
changeset
|
2662 (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
|
2663 * set: |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2664 <filteredset |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2665 <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
|
2666 <contains 'glob:*'>> |
29935
e34cd85dc5b1
revset: fix order of nested '_(|int|hex)list' expression (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
29934
diff
changeset
|
2667 2 |
29390
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2668 1 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2669 0 |
9349b4073c11
test-revset: show how inconsistent the ordering of compound expressions is
Yuya Nishihara <yuya@tcha.org>
parents:
29362
diff
changeset
|
2670 |
20717
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2671 test sort revset |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2672 -------------------------------------------- |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2673 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2674 test when adding two unordered revsets |
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 $ log 'sort(keyword(issue) or modifies(b))' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2677 4 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2678 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2679 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2680 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
|
2681 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2682 $ log 'sort(reverse(all()), -rev)' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2683 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2684 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2685 7 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2686 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2687 5 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2688 4 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2689 3 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2690 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2691 1 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2692 0 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2693 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2694 test when sorting a reversed collection |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2695 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2696 $ log 'sort(reverse(all()), rev)' |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2697 0 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2698 1 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2699 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2700 3 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2701 4 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2702 5 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2703 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2704 7 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2705 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2706 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2707 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2708 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2709 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
|
2710 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2711 $ 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
|
2712 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2713 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2714 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2715 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2716 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2717 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
|
2718 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2719 $ 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
|
2720 9 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2721 8 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2722 6 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2723 2 |
da3124178fbb
tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20613
diff
changeset
|
2724 |
29362
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2725 test empty sort key which is noop |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2726 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2727 $ log 'sort(0 + 2 + 1, "")' |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2728 0 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2729 2 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2730 1 |
ec75d77df9d7
revset: fix crash on empty sort key
Yuya Nishihara <yuya@tcha.org>
parents:
29348
diff
changeset
|
2731 |
29264
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2732 test invalid sort keys |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2733 |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2734 $ log 'sort(all(), -invalid)' |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2735 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
|
2736 [255] |
22625884b15c
revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org>
parents:
29139
diff
changeset
|
2737 |
29001
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2738 $ cd .. |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2739 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2740 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
|
2741 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2742 $ 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
|
2743 $ cd sorting |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2744 $ 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
|
2745 > [ui] |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2746 > 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
|
2747 > [templatealias] |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2748 > 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
|
2749 > EOF |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2750 $ 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
|
2751 $ 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
|
2752 $ 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
|
2753 $ 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
|
2754 $ 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
|
2755 $ 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
|
2756 $ 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
|
2757 $ 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
|
2758 $ 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
|
2759 $ 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
|
2760 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
|
2761 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2762 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
|
2763 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2764 $ 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
|
2765 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
|
2766 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
|
2767 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
|
2768 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
|
2769 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
|
2770 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2771 $ 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
|
2772 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
|
2773 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
|
2774 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
|
2775 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
|
2776 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
|
2777 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2778 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
|
2779 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2780 $ 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
|
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 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
|
2783 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
|
2784 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
|
2785 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
|
2786 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2787 $ 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
|
2788 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
|
2789 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
|
2790 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
|
2791 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
|
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 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2794 $ 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
|
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 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
|
2797 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
|
2798 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
|
2799 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
|
2800 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2801 $ 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
|
2802 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
|
2803 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
|
2804 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
|
2805 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
|
2806 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
|
2807 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2808 $ 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
|
2809 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
|
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 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
|
2812 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
|
2813 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
|
2814 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2815 $ 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
|
2816 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
|
2817 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
|
2818 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
|
2819 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
|
2820 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
|
2821 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2822 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
|
2823 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2824 $ 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
|
2825 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
|
2826 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
|
2827 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
|
2828 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
|
2829 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
|
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 '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
|
2832 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
|
2833 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
|
2834 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
|
2835 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
|
2836 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
|
2837 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2838 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
|
2839 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
|
2840 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2841 $ 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
|
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 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
|
2844 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2845 $ 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
|
2846 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
|
2847 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
|
2848 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2849 $ 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
|
2850 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
|
2851 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
|
2852 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2853 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
|
2854 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2855 $ 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
|
2856 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
|
2857 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
|
2858 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
|
2859 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
|
2860 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
|
2861 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2862 $ 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
|
2863 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
|
2864 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
|
2865 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
|
2866 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
|
2867 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
|
2868 |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2869 $ 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
|
2870 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
|
2871 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
|
2872 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
|
2873 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
|
2874 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
|
2875 |
29348
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2876 toposort prioritises graph branches |
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 up 2 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2879 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
|
2880 $ touch a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2881 $ hg addremove |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2882 adding a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2883 $ hg ci -m 't1' -u 'tu' -d '130 0' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2884 created new head |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2885 $ echo 'a' >> a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2886 $ hg ci -m 't2' -u 'tu' -d '130 0' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2887 $ hg book book1 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2888 $ hg up 4 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2889 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
|
2890 (leaving bookmark book1) |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2891 $ touch a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2892 $ hg addremove |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2893 adding a |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2894 $ hg ci -m 't3' -u 'tu' -d '130 0' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2895 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2896 $ hg log -r 'sort(all(), topo)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2897 7 b111 t3 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2898 4 b111 m112 u111 110 14400 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2899 3 b112 m111 u11 120 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2900 6 b111 t2 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2901 5 b111 t1 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2902 2 b111 m11 u12 111 3600 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2903 1 b11 m12 u111 112 7200 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2904 0 b12 m111 u112 111 10800 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2905 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2906 $ hg log -r 'sort(all(), -topo)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2907 0 b12 m111 u112 111 10800 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2908 1 b11 m12 u111 112 7200 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2909 2 b111 m11 u12 111 3600 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2910 5 b111 t1 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2911 6 b111 t2 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2912 3 b112 m111 u11 120 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2913 4 b111 m112 u111 110 14400 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2914 7 b111 t3 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2915 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2916 $ hg log -r 'sort(all(), topo, topo.firstbranch=book1)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2917 6 b111 t2 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2918 5 b111 t1 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2919 7 b111 t3 tu 130 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2920 4 b111 m112 u111 110 14400 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2921 3 b112 m111 u11 120 0 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2922 2 b111 m11 u12 111 3600 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2923 1 b11 m12 u111 112 7200 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2924 0 b12 m111 u112 111 10800 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2925 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2926 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
|
2927 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
|
2928 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2929 $ hg log -r 'sort(all(), "topo user")' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2930 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
|
2931 [255] |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2932 |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2933 $ hg log -r 'sort(all(), user, topo.firstbranch=book1)' |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2934 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
|
2935 [255] |
2188f170f5b6
revset: add new topographical sort
Martijn Pieters <mjpieters@fb.com>
parents:
29321
diff
changeset
|
2936 |
29766
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2937 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
|
2938 |
5004ef47f437
revset: fix keyword arguments to go through optimization process
Yuya Nishihara <yuya@tcha.org>
parents:
29441
diff
changeset
|
2939 $ 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
|
2940 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
|
2941 |
29001
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2942 $ cd .. |
923fa9e06ea0
revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Yuya Nishihara <yuya@tcha.org>
parents:
28785
diff
changeset
|
2943 $ cd repo |
36685
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2944 |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2945 test multiline revset with errors |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2946 |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2947 $ echo > multiline-revset |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2948 $ echo '. +' >> multiline-revset |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2949 $ echo '.^ +' >> multiline-revset |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2950 $ 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
|
2951 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
|
2952 ( . + .^ + |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2953 ^ here) |
2a258985ffeb
revsetlang: add a hint for more useful parse errors
Ryan McElroy <rmcelroy@fb.com>
parents:
36583
diff
changeset
|
2954 [255] |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2955 $ 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
|
2956 * parsed: |
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 'revset') |
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 'first') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2961 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2962 (symbol 'rev') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2963 (symbol '0')))) |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2964 * expanded: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2965 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2966 (symbol 'revset') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2967 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2968 (symbol 'first') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2969 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2970 (symbol 'rev') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2971 (symbol '0')))) |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2972 * concatenated: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2973 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2974 (symbol 'revset') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2975 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2976 (symbol 'first') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2977 (func |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2978 (symbol 'rev') |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2979 (symbol '0')))) |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2980 * analyzed: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2981 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2982 (symbol 'revset') |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2983 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2984 (symbol 'first') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2985 (func |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2986 (symbol 'rev') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2987 (symbol '0')))) |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2988 * optimized: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2989 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2990 (symbol 'revset') |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2991 (func |
40311
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2992 (symbol 'first') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2993 (func |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2994 (symbol 'rev') |
4aa04d009167
revset: drop special case of 'revset(...)' function in analyze
Boris Feld <boris.feld@octobus.net>
parents:
39832
diff
changeset
|
2995 (symbol '0')))) |
37760
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2996 * set: |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2997 <baseset+ [0]> |
29eb4cafeeb8
revset: skip legacy lookup for revspec wrapped in 'revset(...)'
Boris Feld <boris.feld@octobus.net>
parents:
37674
diff
changeset
|
2998 0 |
41680
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
2999 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3000 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
|
3001 $ log 'expectsize()' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3002 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
|
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, a)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3005 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
|
3006 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3007 $ 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
|
3008 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3009 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3010 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3011 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3012 $ 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
|
3013 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3014 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3015 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3016 $ 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
|
3017 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
|
3018 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3019 $ 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
|
3020 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
|
3021 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3022 $ 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
|
3023 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3024 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3025 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3026 $ 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
|
3027 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
|
3028 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3029 $ 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
|
3030 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
|
3031 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3032 $ 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
|
3033 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
|
3034 [255] |
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, a:4)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3036 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
|
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:b)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3039 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
|
3040 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3041 $ 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
|
3042 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3043 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3044 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3045 $ 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
|
3046 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3047 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3048 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3049 $ log 'expectsize(0:2, :)' |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3050 0 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3051 1 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3052 2 |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3053 $ 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
|
3054 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
|
3055 [255] |
8185c8abce87
revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41563
diff
changeset
|
3056 $ 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
|
3057 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
|
3058 [255] |