tests/test-revset.t
author Yuya Nishihara <yuya@tcha.org>
Sun, 17 May 2015 15:11:38 +0900
changeset 25343 7fbef7932af9
parent 25309 b333ca94403d
child 25344 ceaf04bb14ff
permissions -rw-r--r--
revset: optimize 'or' operation of trivial revisions to a list As seen in issue4565 and issue4624, GUI wrappers and automated scripts are likely to generate a long query that just has numeric revisions joined by 'or'. One reason why is that they allows users to choose arbitrary revisions from a list. Because this use case isn't handled well by smartset, let's optimize it to a plain old list. Benchmarks: 1) reduce nesting of chained 'or' operations 2) optimize to a list (this patch) revset #0: 0 + 1 + 2 + ... + 1000 1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20) 2) wall 0.025393 comb 0.020000 user 0.020000 sys 0.000000 (best of 107) revset #1: sort(0 + 1 + 2 + ... + 1000) 1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) 2) wall 0.026432 comb 0.030000 user 0.030000 sys 0.000000 (best of 102) revset #2: first(0 + 1 + 2 + ... + 1000) 1) wall 0.028949 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) 2) wall 0.025503 comb 0.030000 user 0.030000 sys 0.000000 (best of 106)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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:
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    15
  >            return baseset([2,2])
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    16
  >        return baseset()
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    17
  >     return baseset([3,3,2,2])
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    18
  > 
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    19
  > mercurial.revset.symbols['r3232'] = r3232
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]
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    23
  > testrevset=$TESTTMP/testrevset.py
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
    24
  > EOF
11409
7a6ac83a15b0 revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
    25
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    26
  $ try() {
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
    27
  >   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
    28
  > }
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
  $ log() {
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    31
  >   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
    32
  > }
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    33
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    34
  $ 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
    35
  $ cd repo
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    36
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    37
  $ 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
    38
  $ 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
    39
  marked working directory as branch a
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    40
  (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
    41
  $ 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
    42
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    43
  $ 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
    44
  $ 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
    45
  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
    46
  $ hg ci -Aqm1
11409
7a6ac83a15b0 revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
    47
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    48
  $ rm a
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    49
  $ 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
    50
  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
    51
  $ hg ci -Aqm2 -u Bob
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    52
16661
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    53
  $ 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
    54
  2
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    55
  $ 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
    56
  0
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    57
  1
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    58
  2
16824
f3b8c82a559c revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents: 16823
diff changeset
    59
  $ 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
    60
  0 a
f3b8c82a559c revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents: 16823
diff changeset
    61
  2 a-b-c-
16661
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    62
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    63
  $ 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
    64
  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
    65
  $ 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
    66
  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
    67
  $ hg ci -Aqm3
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    68
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    69
  $ 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
    70
  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
    71
  $ 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
    72
  $ 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
    73
  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
    74
  $ hg ci -Aqm4 -d "May 12 2005"
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    75
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    76
  $ 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
    77
  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
    78
  $ hg branch !a/b/c/
c739227b5eea test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16824
diff changeset
    79
  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
    80
  $ 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
    81
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    82
  $ 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
    83
  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
    84
  (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
    85
  $ 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
    86
  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
    87
  $ hg ci -Aqm"6 issue619"
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    88
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    89
  $ 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
    90
  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
    91
  $ 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
    92
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 all
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 all
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    95
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    96
  $ 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
    97
  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
    98
  $ hg branch é
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12786
diff changeset
    99
  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
   100
  $ hg ci -Aqm9
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   101
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   102
  $ 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
   103
  $ hg bookmark -r6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   104
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   105
  $ 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
   106
  $ 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
   107
  $ 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
   108
  $ 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
   109
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   110
trivial
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   111
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   112
  $ try 0:1
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   113
  (range
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   114
    ('symbol', '0')
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   115
    ('symbol', '1'))
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   116
  * set:
24459
7d369fae098e revset: optimize "x & fullreposet" case
Yuya Nishihara <yuya@tcha.org>
parents: 24458
diff changeset
   117
  <spanset+ 0:1>
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   118
  0
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   119
  1
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   120
  $ try 3::6
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   121
  (dagrange
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   122
    ('symbol', '3')
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   123
    ('symbol', '6'))
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   124
  * set:
24459
7d369fae098e revset: optimize "x & fullreposet" case
Yuya Nishihara <yuya@tcha.org>
parents: 24458
diff changeset
   125
  <baseset [3, 5, 6]>
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   126
  3
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   127
  5
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   128
  6
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   129
  $ try '0|1|2'
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   130
  (or
25309
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
   131
    ('symbol', '0')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
   132
    ('symbol', '1')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   133
    ('symbol', '2'))
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   134
  * set:
25343
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   135
  <baseset [0, 1, 2]>
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   136
  0
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   137
  1
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   138
  2
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   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
names that should work without quoting
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   141
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   142
  $ try a
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   143
  ('symbol', 'a')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   144
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   145
  <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
   146
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   147
  $ try b-a
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   148
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   149
    ('symbol', 'b')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   150
    ('symbol', 'a'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   151
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   152
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   153
    <baseset [1]>>
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   154
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   155
  $ try _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
   156
  ('symbol', '_a_b_c_')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   157
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   158
  <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
   159
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   160
  $ try _a_b_c_-a
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   161
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   162
    ('symbol', '_a_b_c_')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   163
    ('symbol', 'a'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   164
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   165
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   166
    <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
   167
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   168
  $ try .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
   169
  ('symbol', '.a.b.c.')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   170
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   171
  <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
   172
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   173
  $ try .a.b.c.-a
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   174
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   175
    ('symbol', '.a.b.c.')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   176
    ('symbol', 'a'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   177
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   178
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   179
    <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
   180
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   181
  $ try -- '-a-b-c-' # complains
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   182
  hg: parse error at 7: not a prefix: end
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   183
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   184
  $ log -a-b-c- # succeeds with fallback
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   185
  4
20781
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   186
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   187
  $ try -- -a-b-c--a # complains
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   188
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   189
    (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   190
      (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   191
        (negate
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   192
          ('symbol', 'a'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   193
        ('symbol', 'b'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   194
      ('symbol', 'c'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   195
    (negate
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   196
      ('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
   197
  abort: unknown revision '-a'!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   198
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   199
  $ try é
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   200
  ('symbol', '\xc3\xa9')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   201
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   202
  <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
   203
  9
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   204
20781
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   205
no quoting needed
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   206
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   207
  $ log ::a-b-c-
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   208
  0
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   209
  1
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   210
  2
8ecfa225bd16 revrange: pass repo to revset parser
Matt Mackall <mpm@selenic.com>
parents: 20736
diff changeset
   211
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   212
quoting needed
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   213
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   214
  $ try '"-a-b-c-"-a'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   215
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   216
    ('string', '-a-b-c-')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   217
    ('symbol', 'a'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   218
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   219
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   220
    <baseset [4]>>
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   221
  4
11882
b75dea24e296 revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 11650
diff changeset
   222
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   223
  $ 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
   224
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   225
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   226
  $ 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
   227
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   228
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   229
  $ 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
   230
  $ 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
   231
  $ try '1&2|3' # precedence - and is higher
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   232
  (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   233
    (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   234
      ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   235
      ('symbol', '2'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   236
    ('symbol', '3'))
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
  <addset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   239
    <baseset []>,
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   240
    <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
   241
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   242
  $ try '1|2&3'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   243
  (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   244
    ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   245
    (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   246
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   247
      ('symbol', '3')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   248
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   249
  <addset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   250
    <baseset [1]>,
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   251
    <baseset []>>
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   252
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   253
  $ try '1&2&3' # associativity
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   254
  (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   255
    (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   256
      ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   257
      ('symbol', '2'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   258
    ('symbol', '3'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   259
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   260
  <baseset []>
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   261
  $ try '1|(2|3)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   262
  (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   263
    ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   264
    (group
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   265
      (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   266
        ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   267
        ('symbol', '3'))))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   268
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   269
  <addset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   270
    <baseset [1]>,
25343
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   271
    <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
   272
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   273
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   274
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   275
  $ 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
   276
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   277
  $ 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
   278
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   279
  $ log '2785f51ee'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   280
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   281
  $ 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
   282
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   283
  $ 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
   284
  hg: parse error at 10: unexpected token: symbol
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   285
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   286
  $ log 'date()'
12736
7e14e67e6622 revset: use 'requires' instead of 'wants' in error message
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 12716
diff changeset
   287
  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
   288
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   289
  $ 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
   290
  abort: unknown revision 'date'!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   291
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   292
  $ log 'date('
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   293
  hg: parse error at 5: not a prefix: end
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   294
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   295
  $ log 'date(tip)'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   296
  abort: invalid date: 'tip'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   297
  [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
   298
  $ 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
   299
  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
   300
  [255]
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   301
  $ 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
   302
  abort: unknown revision 'date'!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   303
  [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
   304
  $ 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
   305
  $ 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
   306
  0
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   307
  1
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   308
  2
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   309
  3
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   310
  4
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   311
  $ 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
   312
  0
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   313
  1
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   314
  2
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   315
  4
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   316
  $ 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
   317
  0
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   318
  1
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   319
  2
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   320
  4
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   321
  $ 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
   322
  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
   323
  $ 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
   324
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   325
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
   326
parenthesis.
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   327
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   328
  $ 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
   329
  $ 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
   330
  8
022282152632 revset: don't error out if tokens parse as existing symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24904
diff changeset
   331
  9
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   332
18536
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   333
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
   334
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   335
  $ 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
   336
  $ log 'ancestor(1)'
18536
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   337
  1
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   338
  $ 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
   339
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   340
  $ 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
   341
  $ 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
   342
  0
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   343
  $ 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
   344
  1
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   345
  $ 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
   346
  0
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   347
  $ 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
   348
  1
24940
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   349
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   350
test ancestors
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   351
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   352
  $ 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
   353
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   354
  1
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
  5
18536
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   357
  $ log 'ancestor(ancestors(5))'
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   358
  0
24940
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   359
  $ log '::r3232()'
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   360
  0
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   361
  1
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   362
  2
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   363
  3
6b54f749659b revset: avoid returning duplicates when returning ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24932
diff changeset
   364
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   365
  $ 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
   366
  2
16823
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   367
  $ 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
   368
  0
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   369
  1
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   370
  2
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   371
  3
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   372
  4
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   373
  5
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   374
  6
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   375
  7
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   376
  8
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   377
  9
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   378
  $ log 'branch(é)'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   379
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   380
  9
16821
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   381
  $ log 'branch(a)'
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   382
  0
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   383
  $ 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
   384
  0 a
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   385
  2 a-b-c-
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   386
  3 +a+b+c+
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   387
  4 -a-b-c-
16851
c739227b5eea test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16824
diff changeset
   388
  5 !a/b/c/
16821
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   389
  6 _a_b_c_
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   390
  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
   391
  $ 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
   392
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   393
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   394
  $ log 'closed()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   395
  $ 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
   396
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   397
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   398
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   399
  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
   400
  $ 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
   401
  0
760151697a4f revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19706
diff changeset
   402
  1
760151697a4f revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19706
diff changeset
   403
  3
760151697a4f revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19706
diff changeset
   404
  5
14650
93731b3efd0d revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14153
diff changeset
   405
  $ log 'desc(B)'
93731b3efd0d revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14153
diff changeset
   406
  5
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   407
  $ 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
   408
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   409
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   410
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   411
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   412
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   413
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   414
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   415
  9
16411
4c2edcd84175 graphlog: correctly handle calls in subdirectories
Patrick Mezard <patrick@mezard.eu>
parents: 16218
diff changeset
   416
  $ 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
   417
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   418
  4
20288
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   419
  $ log 'filelog("b")'
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   420
  1
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   421
  4
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   422
  $ 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
   423
  1
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   424
  4
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   425
  $ log 'follow()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   426
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   427
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   428
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   429
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   430
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   431
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   432
  $ 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
   433
  6
12321
11db6fa2961e merge with stable
Martin Geisler <mg@aragost.com>
parents: 12320 12316
diff changeset
   434
  $ try 'grep("(")' # invalid regular expression
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   435
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   436
    ('symbol', 'grep')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   437
    ('string', '('))
12321
11db6fa2961e merge with stable
Martin Geisler <mg@aragost.com>
parents: 12320 12316
diff changeset
   438
  hg: parse error: invalid match pattern: unbalanced parenthesis
11db6fa2961e merge with stable
Martin Geisler <mg@aragost.com>
parents: 12320 12316
diff changeset
   439
  [255]
12408
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   440
  $ try 'grep("\bissue\d+")'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   441
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   442
    ('symbol', 'grep')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   443
    ('string', '\x08issue\\d+'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   444
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   445
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   446
    <fullreposet+ 0:9>>
12408
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   447
  $ try 'grep(r"\bissue\d+")'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   448
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   449
    ('symbol', 'grep')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   450
    ('string', '\\bissue\\d+'))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   451
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   452
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
   453
    <fullreposet+ 0:9>>
12408
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   454
  6
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   455
  $ try 'grep(r"\")'
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   456
  hg: parse error at 7: unterminated string
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   457
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   458
  $ log 'head()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   459
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   460
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   461
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   462
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   463
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   464
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   465
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   466
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   467
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   468
  $ 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
   469
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   470
  $ 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
   471
  6
19706
26ddce1a2a55 revset: fix wrong keyword() behaviour for strings with spaces
Alexander Plavin <alexander@plav.in>
parents: 18955
diff changeset
   472
  $ log 'keyword("test a")'
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   473
  $ 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
   474
  0
16447
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   475
  $ log 'matching(6)'
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   476
  6
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   477
  $ 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
   478
  6
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   479
  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
   480
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   481
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
   482
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   483
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
   484
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   485
  $ 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
   486
  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
   487
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   488
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
   489
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   490
  $ 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
   491
  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
   492
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   493
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
   494
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   495
  $ 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
   496
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   497
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
   498
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   499
  $ 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
   500
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   501
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
   502
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   503
  $ 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
   504
  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
   505
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   506
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
   507
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   508
  $ 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
   509
  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
   510
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   511
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
   512
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   513
  $ 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
   514
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   515
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
   516
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   517
  $ 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
   518
876c17336b4e revset: raise ValueError when calling min or max on empty smartset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20862
diff changeset
   519
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   520
  $ log 'merge()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   521
  6
17753
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   522
  $ log 'branchpoint()'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   523
  1
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   524
  4
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   525
  $ 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
   526
  4
16521
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   527
  $ log 'modifies("path:b")'
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   528
  4
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   529
  $ log 'modifies("*")'
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   530
  4
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   531
  6
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   532
  $ log 'modifies("set:modified()")'
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   533
  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
   534
  $ 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
   535
  2
20613
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   536
  $ log 'only(9)'
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   537
  8
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   538
  9
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   539
  $ log 'only(8)'
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   540
  8
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   541
  $ log 'only(9, 5)'
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   542
  2
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   543
  4
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   544
  8
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   545
  9
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   546
  $ log 'only(7 + 9, 5 + 2)'
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   547
  4
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   548
  6
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   549
  7
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   550
  8
10433163bf57 revset: add 'only' revset
Durham Goode <durham@fb.com>
parents: 20499
diff changeset
   551
  9
21925
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   552
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   553
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
   554
  $ 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
   555
  $ 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
   556
  0
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   557
  1
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   558
  2
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   559
  4
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   560
  8
7142e04b438e revset: avoid a ValueError when 'only()' is given an empty set
Matt Harbison <matt_harbison@yahoo.com>
parents: 21893
diff changeset
   561
  9
23062
ba89f7b542c9 revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents: 22861
diff changeset
   562
23765
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   563
Test '%' operator
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   564
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   565
  $ log '9%'
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   566
  8
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   567
  9
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   568
  $ log '9%5'
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   569
  2
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   570
  4
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   571
  8
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   572
  9
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   573
  $ log '(7 + 9)%(5 + 2)'
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   574
  4
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   575
  6
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   576
  7
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   577
  8
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   578
  9
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   579
25094
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   580
Test opreand of '%' is optimized recursively (issue4670)
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   581
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   582
  $ 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
   583
  (onlypost
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   584
    (minus
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   585
      (range
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   586
        ('symbol', '8')
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   587
        ('symbol', '9'))
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   588
      ('symbol', '8')))
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   589
  * optimized:
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   590
  (func
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   591
    ('symbol', 'only')
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   592
    (and
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   593
      (range
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   594
        ('symbol', '8')
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   595
        ('symbol', '9'))
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   596
      (not
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   597
        ('symbol', '8'))))
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   598
  * set:
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   599
  <baseset+ [8, 9]>
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   600
  8
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   601
  9
25105
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   602
  $ try --optimize '(9)%(5)'
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   603
  (only
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   604
    (group
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   605
      ('symbol', '9'))
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   606
    (group
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   607
      ('symbol', '5')))
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   608
  * optimized:
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   609
  (func
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   610
    ('symbol', 'only')
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   611
    (list
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   612
      ('symbol', '9')
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   613
      ('symbol', '5')))
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   614
  * set:
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   615
  <baseset+ [8, 9, 2, 4]>
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   616
  2
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   617
  4
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   618
  8
2f34746c27df revset: remove unused 'only' from methods table
Yuya Nishihara <yuya@tcha.org>
parents: 25102
diff changeset
   619
  9
25094
8b99e9a8db05 revset: map postfix '%' to only() to optimize operand recursively (issue4670)
Yuya Nishihara <yuya@tcha.org>
parents: 24904
diff changeset
   620
23765
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   621
Test the order of operations
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   622
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   623
  $ log '7 + 9%5 + 2'
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   624
  7
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   625
  2
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   626
  4
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   627
  8
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   628
  9
537a2669a113 revset: use '%' as an operator for 'only'
Sean Farley <sean.michael.farley@gmail.com>
parents: 23742
diff changeset
   629
23062
ba89f7b542c9 revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents: 22861
diff changeset
   630
Test explicit numeric revision
23954
310222feb9a8 revset: allow rev(-1) to indicate null revision (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 23846
diff changeset
   631
  $ 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
   632
  $ log 'rev(-1)'
23954
310222feb9a8 revset: allow rev(-1) to indicate null revision (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 23846
diff changeset
   633
  -1
23062
ba89f7b542c9 revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents: 22861
diff changeset
   634
  $ 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
   635
  0
ba89f7b542c9 revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents: 22861
diff changeset
   636
  $ 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
   637
  9
ba89f7b542c9 revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents: 22861
diff changeset
   638
  $ 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
   639
  $ 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
   640
  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
   641
  [255]
ba89f7b542c9 revset: have rev() drop out-of-range or filtered rev explicitly (issue4396)
Yuya Nishihara <yuya@tcha.org>
parents: 22861
diff changeset
   642
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
   643
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
   644
  $ log 'id(2)'
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
   645
  abort: 00changelog.i@2: ambiguous identifier!
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
   646
  [255]
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
   647
  $ 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
   648
  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
   649
  $ 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
   650
  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
   651
  $ 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
   652
  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
   653
  $ 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
   654
  $ 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
   655
  $ 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
   656
  $ 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
   657
  $ 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
   658
  $ 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
   659
23956
b1e026c25552 revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents: 23954
diff changeset
   660
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
   661
  $ log '(null)'
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   662
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   663
  $ log '(null:0)'
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   664
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   665
  0
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   666
  $ log '(0:null)'
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   667
  0
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   668
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   669
  $ log 'null::0'
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   670
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   671
  0
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   672
  $ 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
   673
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   674
  $ 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
   675
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   676
  $ 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
   677
  -1
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   678
  0
23956
b1e026c25552 revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents: 23954
diff changeset
   679
  $ log 'ancestors(null)'
b1e026c25552 revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents: 23954
diff changeset
   680
  -1
24204
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   681
  $ 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
   682
  0
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   683
  -1
25265
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
   684
BROKEN: should be '-1'
24204
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   685
  $ log 'first(null:)'
25265
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
   686
BROKEN: should be '-1'
24204
d2de20e1451f revset: extend fullreposet to make "null" revision magically appears in set
Yuya Nishihara <yuya@tcha.org>
parents: 24202
diff changeset
   687
  $ log 'min(null:)'
24202
2de9ee016425 revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents: 24175
diff changeset
   688
  $ log 'tip:null and all()' | tail -2
2de9ee016425 revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents: 24175
diff changeset
   689
  1
2de9ee016425 revset: have all() filter out null revision
Yuya Nishihara <yuya@tcha.org>
parents: 24175
diff changeset
   690
  0
23956
b1e026c25552 revset: fix ancestors(null) to include null revision (issue4512)
Yuya Nishihara <yuya@tcha.org>
parents: 23954
diff changeset
   691
24419
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 24222
diff changeset
   692
Test working-directory revision
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 24222
diff changeset
   693
  $ hg debugrevspec 'wdir()'
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 24222
diff changeset
   694
  None
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 24222
diff changeset
   695
  $ 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
   696
  9
25287
56eed3923dbc test-revset: update test that isn't broken on default branch
Yuya Nishihara <yuya@tcha.org>
parents: 25270
diff changeset
   697
  None
24419
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 24222
diff changeset
   698
  $ hg debugrevspec '0:tip and wdir()'
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 24222
diff changeset
   699
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   700
  $ log 'outgoing()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   701
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   702
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   703
  $ 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
   704
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   705
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   706
  $ 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
   707
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   708
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   709
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   710
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   711
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   712
  $ 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
   713
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   714
  $ 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
   715
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   716
  $ 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
   717
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   718
  5
17753
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   719
  $ log 'p1(branchpoint())'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   720
  0
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   721
  2
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   722
  $ log 'p2(branchpoint())'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   723
  $ log 'parents(branchpoint())'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   724
  0
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   725
  2
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   726
  $ 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
   727
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   728
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   729
  $ 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
   730
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   731
  $ 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
   732
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   733
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   734
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   735
  2
17100
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   736
  $ log 'reverse(all())'
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   737
  9
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   738
  8
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   739
  7
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   740
  6
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   741
  5
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   742
  4
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   743
  3
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   744
  2
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   745
  1
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   746
  0
23826
c90d195320c5 revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents: 23062
diff changeset
   747
  $ 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
   748
  4
c90d195320c5 revset: fix spanset.isascending() to honor sort() or reverse() request
Yuya Nishihara <yuya@tcha.org>
parents: 23062
diff changeset
   749
  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
   750
  $ 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
   751
  5
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   752
  $ 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
   753
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   754
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   755
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   756
  $ 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
   757
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   758
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   759
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   760
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   761
  $ log 'tagged()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   762
  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
   763
  $ 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
   764
  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
   765
  $ 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
   766
  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
   767
  $ 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
   768
  9
16820
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   769
20717
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   770
test sort revset
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   771
--------------------------------------------
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   772
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   773
test when adding two unordered revsets
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   774
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   775
  $ log 'sort(keyword(issue) or modifies(b))'
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   776
  4
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   777
  6
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   778
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   779
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
   780
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   781
  $ log 'sort(reverse(all()), -rev)'
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   782
  9
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   783
  8
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   784
  7
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   785
  6
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   786
  5
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   787
  4
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   788
  3
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   789
  2
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   790
  1
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   791
  0
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   792
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   793
test when sorting a reversed collection
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   794
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   795
  $ log 'sort(reverse(all()), rev)'
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   796
  0
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   797
  1
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   798
  2
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   799
  3
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   800
  4
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   801
  5
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   802
  6
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   803
  7
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   804
  8
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   805
  9
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   806
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   807
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   808
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
   809
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   810
  $ 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
   811
  2
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   812
  6
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   813
  8
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   814
  9
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   815
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   816
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
   817
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   818
  $ 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
   819
  9
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   820
  8
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   821
  6
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   822
  2
da3124178fbb tests: added tests to test sort revset
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20613
diff changeset
   823
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 20894
diff changeset
   824
test subtracting something from an addset
20736
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   825
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   826
  $ log '(outgoing() or removes(a)) - removes(a)'
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   827
  8
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   828
  9
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   829
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   830
test intersecting something with an addset
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   831
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   832
  $ log 'parents(outgoing() or removes(a))'
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   833
  1
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   834
  4
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   835
  5
22712
093df3b77f27 revert: bring back usage of `subset & ps` in `parents`
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22450
diff changeset
   836
  8
20736
b0203624ab20 revset: extend sorting tests
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 20717
diff changeset
   837
22861
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   838
test that `or` operation combines elements in the right order:
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   839
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   840
  $ log '3:4 or 2:5'
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   841
  3
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   842
  4
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   843
  2
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   844
  5
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   845
  $ log '3:4 or 5:2'
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   846
  3
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   847
  4
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   848
  5
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   849
  2
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   850
  $ log 'sort(3:4 or 2:5)'
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   851
  2
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   852
  3
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   853
  4
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   854
  5
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   855
  $ log 'sort(3:4 or 5:2)'
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   856
  2
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   857
  3
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   858
  4
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   859
  5
546fa6576815 revset: restore order of `or` operation as in Mercurial 2.9
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22712
diff changeset
   860
25024
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   861
test that `or` operation skips duplicated revisions from right-hand side
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   862
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   863
  $ try 'reverse(1::5) or ancestors(4)'
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   864
  (or
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   865
    (func
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   866
      ('symbol', 'reverse')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   867
      (dagrange
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   868
        ('symbol', '1')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   869
        ('symbol', '5')))
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   870
    (func
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   871
      ('symbol', 'ancestors')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   872
      ('symbol', '4')))
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   873
  * set:
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   874
  <addset
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   875
    <baseset [5, 3, 1]>,
25129
40a2cf1c765b revset: drop redundant filteredset from right-hand side set of "or" operation
Yuya Nishihara <yuya@tcha.org>
parents: 25105
diff changeset
   876
    <generatorset+>>
25024
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   877
  5
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   878
  3
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   879
  1
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   880
  0
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   881
  2
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   882
  4
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   883
  $ try 'sort(ancestors(4) or reverse(1::5))'
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   884
  (func
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   885
    ('symbol', 'sort')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   886
    (or
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   887
      (func
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   888
        ('symbol', 'ancestors')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   889
        ('symbol', '4'))
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   890
      (func
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   891
        ('symbol', 'reverse')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   892
        (dagrange
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   893
          ('symbol', '1')
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   894
          ('symbol', '5')))))
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   895
  * set:
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   896
  <addset+
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   897
    <generatorset+>,
25129
40a2cf1c765b revset: drop redundant filteredset from right-hand side set of "or" operation
Yuya Nishihara <yuya@tcha.org>
parents: 25105
diff changeset
   898
    <baseset [5, 3, 1]>>
25024
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   899
  0
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   900
  1
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   901
  2
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   902
  3
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   903
  4
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   904
  5
263bbed1833c revset: test current behavior of addset class
Yuya Nishihara <yuya@tcha.org>
parents: 24940
diff changeset
   905
25343
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   906
test optimization of trivial `or` operation
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   907
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   908
  $ try --optimize '0|(1)|"2"|-2|tip|null'
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   909
  (or
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   910
    ('symbol', '0')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   911
    (group
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   912
      ('symbol', '1'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   913
    ('string', '2')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   914
    (negate
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   915
      ('symbol', '2'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   916
    ('symbol', 'tip')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   917
    ('symbol', 'null'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   918
  * optimized:
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   919
  (func
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   920
    ('symbol', '_list')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   921
    ('string', '0\x001\x002\x00-2\x00tip\x00null'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   922
  * set:
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   923
  <baseset [0, 1, 2, 8, 9, -1]>
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   924
  0
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   925
  1
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   926
  2
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   927
  8
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   928
  9
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   929
  -1
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   930
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   931
  $ try --optimize '0|1|2:3'
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   932
  (or
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   933
    ('symbol', '0')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   934
    ('symbol', '1')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   935
    (range
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   936
      ('symbol', '2')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   937
      ('symbol', '3')))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   938
  * optimized:
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   939
  (or
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   940
    (func
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   941
      ('symbol', '_list')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   942
      ('string', '0\x001'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   943
    (range
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   944
      ('symbol', '2')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   945
      ('symbol', '3')))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   946
  * set:
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   947
  <addset
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   948
    <baseset [0, 1]>,
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   949
    <spanset+ 2:3>>
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   950
  0
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   951
  1
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   952
  2
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   953
  3
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   954
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   955
  $ try --optimize '0:1|2|3:4|5|6'
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   956
  (or
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   957
    (range
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   958
      ('symbol', '0')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   959
      ('symbol', '1'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   960
    ('symbol', '2')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   961
    (range
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   962
      ('symbol', '3')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   963
      ('symbol', '4'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   964
    ('symbol', '5')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   965
    ('symbol', '6'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   966
  * optimized:
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   967
  (or
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   968
    (range
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   969
      ('symbol', '0')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   970
      ('symbol', '1'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   971
    ('symbol', '2')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   972
    (range
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   973
      ('symbol', '3')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   974
      ('symbol', '4'))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   975
    (func
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   976
      ('symbol', '_list')
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   977
      ('string', '5\x006')))
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   978
  * set:
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   979
  <addset
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   980
    <addset
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   981
      <spanset+ 0:1>,
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   982
      <baseset [2]>>,
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   983
    <addset
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   984
      <spanset+ 3:4>,
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   985
      <baseset [5, 6]>>>
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   986
  0
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   987
  1
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   988
  2
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   989
  3
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   990
  4
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   991
  5
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   992
  6
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   993
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   994
test that `_list` should be narrowed by provided `subset`
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   995
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   996
  $ log '0:2 and (null|1|2|3)'
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   997
  1
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   998
  2
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
   999
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1000
test that `_list` should remove duplicates
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1001
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1002
  $ log '0|1|2|1|2|-1|tip'
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1003
  0
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1004
  1
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1005
  2
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1006
  9
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1007
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1008
test unknown revision in `_list`
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1009
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1010
  $ log '0|unknown'
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1011
  abort: unknown revision 'unknown'!
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1012
  [255]
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1013
25309
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1014
test that chained `or` operations make balanced addsets
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1015
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1016
  $ try '0:1|1:2|2:3|3:4|4:5'
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1017
  (or
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1018
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1019
      ('symbol', '0')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1020
      ('symbol', '1'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1021
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1022
      ('symbol', '1')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1023
      ('symbol', '2'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1024
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1025
      ('symbol', '2')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1026
      ('symbol', '3'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1027
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1028
      ('symbol', '3')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1029
      ('symbol', '4'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1030
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1031
      ('symbol', '4')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1032
      ('symbol', '5')))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1033
  * set:
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1034
  <addset
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1035
    <addset
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1036
      <spanset+ 0:1>,
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1037
      <spanset+ 1:2>>,
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1038
    <addset
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1039
      <spanset+ 2:3>,
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1040
      <addset
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1041
        <spanset+ 3:4>,
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1042
        <spanset+ 4:5>>>>
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1043
  0
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1044
  1
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1045
  2
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1046
  3
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1047
  4
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1048
  5
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1049
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1050
test that chained `or` operations never eat up stack (issue4624)
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1051
(uses `0:1` instead of `0` to avoid future optimization of trivial revisions)
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1052
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1053
  $ hg log -T '{rev}\n' -r "`python -c "print '|'.join(['0:1'] * 500)"`"
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1054
  0
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1055
  1
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1056
21893
e967c3b08705 revset: replace _missingancestors optimization with only revset
Siddharth Agarwal <sid0@fb.com>
parents: 21870
diff changeset
  1057
check that conversion to only works
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1058
  $ try --optimize '::3 - ::1'
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1059
  (minus
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1060
    (dagrangepre
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1061
      ('symbol', '3'))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1062
    (dagrangepre
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1063
      ('symbol', '1')))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1064
  * optimized:
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1065
  (func
21893
e967c3b08705 revset: replace _missingancestors optimization with only revset
Siddharth Agarwal <sid0@fb.com>
parents: 21870
diff changeset
  1066
    ('symbol', 'only')
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1067
    (list
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1068
      ('symbol', '3')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1069
      ('symbol', '1')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1070
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1071
  <baseset+ [3]>
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1072
  3
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1073
  $ try --optimize 'ancestors(1) - ancestors(3)'
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1074
  (minus
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1075
    (func
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1076
      ('symbol', 'ancestors')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1077
      ('symbol', '1'))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1078
    (func
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1079
      ('symbol', 'ancestors')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1080
      ('symbol', '3')))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1081
  * optimized:
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1082
  (func
21893
e967c3b08705 revset: replace _missingancestors optimization with only revset
Siddharth Agarwal <sid0@fb.com>
parents: 21870
diff changeset
  1083
    ('symbol', 'only')
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1084
    (list
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1085
      ('symbol', '1')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1086
      ('symbol', '3')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1087
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1088
  <baseset+ []>
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1089
  $ try --optimize 'not ::2 and ::6'
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1090
  (and
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1091
    (not
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1092
      (dagrangepre
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1093
        ('symbol', '2')))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1094
    (dagrangepre
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1095
      ('symbol', '6')))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1096
  * optimized:
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1097
  (func
21893
e967c3b08705 revset: replace _missingancestors optimization with only revset
Siddharth Agarwal <sid0@fb.com>
parents: 21870
diff changeset
  1098
    ('symbol', 'only')
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1099
    (list
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1100
      ('symbol', '6')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1101
      ('symbol', '2')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1102
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1103
  <baseset+ [3, 4, 5, 6]>
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1104
  3
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1105
  4
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1106
  5
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1107
  6
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1108
  $ try --optimize 'ancestors(6) and not ancestors(4)'
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1109
  (and
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1110
    (func
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1111
      ('symbol', 'ancestors')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1112
      ('symbol', '6'))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1113
    (not
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1114
      (func
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1115
        ('symbol', 'ancestors')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1116
        ('symbol', '4'))))
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1117
  * optimized:
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1118
  (func
21893
e967c3b08705 revset: replace _missingancestors optimization with only revset
Siddharth Agarwal <sid0@fb.com>
parents: 21870
diff changeset
  1119
    ('symbol', 'only')
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1120
    (list
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1121
      ('symbol', '6')
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1122
      ('symbol', '4')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1123
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1124
  <baseset+ [3, 5, 6]>
20499
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1125
  3
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1126
  5
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1127
  6
2efd608473fb revset: optimize missing ancestor expressions
Siddharth Agarwal <sid0@fb.com>
parents: 20393
diff changeset
  1128
16820
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1129
we can use patterns when searching for tags
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1130
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1131
  $ log 'tag("1..*")'
23978
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1132
  abort: tag '1..*' does not exist!
16820
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1133
  [255]
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1134
  $ log 'tag("re:1..*")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1135
  6
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1136
  $ log 'tag("re:[0-9].[0-9]")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1137
  6
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1138
  $ log 'tag("literal:1.0")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1139
  6
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1140
  $ log 'tag("re:0..*")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
  1141
13925
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
  1142
  $ log 'tag(unknown)'
23978
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1143
  abort: tag 'unknown' does not exist!
13925
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
  1144
  [255]
23978
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1145
  $ log 'tag("re:unknown")'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1146
  $ log 'present(tag("unknown"))'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1147
  $ log 'present(tag("re:unknown"))'
13925
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
  1148
  $ log 'branch(unknown)'
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
  1149
  abort: unknown revision 'unknown'!
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
  1150
  [255]
23978
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1151
  $ log 'branch("re:unknown")'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1152
  $ log 'present(branch("unknown"))'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1153
  $ log 'present(branch("re:unknown"))'
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1154
  $ log 'user(bob)'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1155
  2
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
  1156
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1157
  $ log '4::8'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1158
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1159
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1160
  $ log '4:8'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1161
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1162
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1163
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1164
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1165
  8
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
  1166
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1167
  $ log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1168
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1169
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1170
  5
11456
88abbb046e66 revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents: 11419
diff changeset
  1171
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1172
  $ log 'not 0 and 0:2'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1173
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1174
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1175
  $ log 'not 1 and 0:2'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1176
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1177
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1178
  $ log 'not 2 and 0:2'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1179
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1180
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1181
  $ 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
  1182
  $ 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
  1183
  $ log '(1 and 2):3'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1184
  $ log 'sort(head(), -rev)'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1185
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1186
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1187
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1188
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1189
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1190
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1191
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1192
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
  1193
  0
12616
e797fdf91df4 revset: lower precedence of minus infix (issue2361)
Matt Mackall <mpm@selenic.com>
parents: 12408
diff changeset
  1194
  $ log '4::8 - 8'
e797fdf91df4 revset: lower precedence of minus infix (issue2361)
Matt Mackall <mpm@selenic.com>
parents: 12408
diff changeset
  1195
  4
16640
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
  1196
  $ log 'matching(1 or 2 or 3) and (2 or 3 or 1)'
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
  1197
  2
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
  1198
  3
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
  1199
  1
12786
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1200
23978
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1201
  $ log 'named("unknown")'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1202
  abort: namespace 'unknown' does not exist!
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1203
  [255]
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1204
  $ log 'named("re:unknown")'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1205
  abort: no namespace exists that match 'unknown'!
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1206
  [255]
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1207
  $ log 'present(named("unknown"))'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1208
  $ log 'present(named("re:unknown"))'
eeb5d5ab14a6 revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23956
diff changeset
  1209
24008
873eb5db89c8 revset: get revision number of each node from target namespaces
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1210
  $ log 'tag()'
873eb5db89c8 revset: get revision number of each node from target namespaces
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1211
  6
873eb5db89c8 revset: get revision number of each node from target namespaces
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1212
  $ log 'named("tags")'
873eb5db89c8 revset: get revision number of each node from target namespaces
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1213
  6
873eb5db89c8 revset: get revision number of each node from target namespaces
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1214
12786
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1215
issue2437
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1216
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1217
  $ log '3 and p1(5)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1218
  3
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1219
  $ log '4 and p2(6)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1220
  4
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1221
  $ log '1 and parents(:2)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1222
  1
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1223
  $ log '2 and children(1:)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1224
  2
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1225
  $ log 'roots(all()) or roots(all())'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1226
  0
16394
f3df7d34791e revset: do not ignore input revisions in roots()
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1227
  $ hg debugrevspec 'roots(all()) or roots(all())'
f3df7d34791e revset: do not ignore input revisions in roots()
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1228
  0
12786
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1229
  $ log 'heads(branch(é)) or heads(branch(é))'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1230
  9
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1231
  $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(é)))'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
  1232
  4
13665
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1233
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1234
issue2654: report a parse error if the revset was not completely parsed
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1235
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1236
  $ log '1 OR 2'
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1237
  hg: parse error at 2: invalid token
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1238
  [255]
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
  1239
13932
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
  1240
or operator should preserve ordering:
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
  1241
  $ log 'reverse(2::4) or tip'
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
  1242
  4
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
  1243
  2
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
  1244
  9
14070
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1245
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1246
parentrevspec
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1247
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1248
  $ log 'merge()^0'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1249
  6
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1250
  $ log 'merge()^'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1251
  5
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1252
  $ log 'merge()^1'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1253
  5
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1254
  $ log 'merge()^2'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1255
  4
14080
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1256
  $ log 'merge()^^'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1257
  3
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1258
  $ log 'merge()^1^'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1259
  3
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1260
  $ log 'merge()^^^'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1261
  1
14070
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1262
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1263
  $ log 'merge()~0'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1264
  6
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1265
  $ log 'merge()~1'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1266
  5
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1267
  $ log 'merge()~2'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1268
  3
14080
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1269
  $ log 'merge()~2^1'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
  1270
  1
14070
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1271
  $ log 'merge()~3'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1272
  1
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1273
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1274
  $ log '(-3:tip)^'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1275
  4
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1276
  6
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1277
  8
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1278
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1279
  $ log 'tip^foo'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1280
  hg: parse error: ^ expects a number 0, 1, or 2
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
  1281
  [255]
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1282
24220
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1283
Bogus function gets suggestions
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1284
  $ log 'add()'
24222
02d7b5cd373b dispatch: offer suggestions of similar-named commands
Augie Fackler <augie@google.com>
parents: 24221
diff changeset
  1285
  hg: parse error: unknown identifier: add
24221
4e240d6ab898 dispatch: offer near-edit-distance suggestions for {file,rev}set functions
Augie Fackler <augie@google.com>
parents: 24220
diff changeset
  1286
  (did you mean 'adds'?)
24220
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1287
  [255]
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1288
  $ log 'added()'
24222
02d7b5cd373b dispatch: offer suggestions of similar-named commands
Augie Fackler <augie@google.com>
parents: 24221
diff changeset
  1289
  hg: parse error: unknown identifier: added
24221
4e240d6ab898 dispatch: offer near-edit-distance suggestions for {file,rev}set functions
Augie Fackler <augie@google.com>
parents: 24220
diff changeset
  1290
  (did you mean 'adds'?)
24220
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1291
  [255]
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1292
  $ log 'remo()'
24222
02d7b5cd373b dispatch: offer suggestions of similar-named commands
Augie Fackler <augie@google.com>
parents: 24221
diff changeset
  1293
  hg: parse error: unknown identifier: remo
24221
4e240d6ab898 dispatch: offer near-edit-distance suggestions for {file,rev}set functions
Augie Fackler <augie@google.com>
parents: 24220
diff changeset
  1294
  (did you mean one of remote, removes?)
24220
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1295
  [255]
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1296
  $ log 'babar()'
24222
02d7b5cd373b dispatch: offer suggestions of similar-named commands
Augie Fackler <augie@google.com>
parents: 24221
diff changeset
  1297
  hg: parse error: unknown identifier: babar
24220
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1298
  [255]
fe195d41f7d2 test-revset: add tests for missing function output
Augie Fackler <augie@google.com>
parents: 24204
diff changeset
  1299
20798
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1300
multiple revspecs
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1301
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1302
  $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n'
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1303
  8
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1304
  9
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1305
  4
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1306
  5
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1307
  6
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1308
  7
170d6d591a7d scmutil: fix revrange when multiple revs are specified
Durham Goode <durham@fb.com>
parents: 20781
diff changeset
  1309
20862
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1310
test usage in revpair (with "+")
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1311
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1312
(real pair)
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1313
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1314
  $ hg diff -r 'tip^^' -r 'tip'
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1315
  diff -r 2326846efdab -r 24286f4ae135 .hgtags
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1316
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1317
  +++ b/.hgtags	Thu Jan 01 00:00:00 1970 +0000
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1318
  @@ -0,0 +1,1 @@
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1319
  +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1320
  $ hg diff -r 'tip^^::tip'
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1321
  diff -r 2326846efdab -r 24286f4ae135 .hgtags
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1322
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1323
  +++ b/.hgtags	Thu Jan 01 00:00:00 1970 +0000
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1324
  @@ -0,0 +1,1 @@
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1325
  +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1326
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1327
(single rev)
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1328
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1329
  $ hg diff -r 'tip^' -r 'tip^'
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1330
  $ hg diff -r 'tip^::tip^ or tip^'
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1331
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1332
(single rev that does not looks like a range)
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1333
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1334
  $ hg diff -r 'tip^ or tip^'
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1335
  diff -r d5d0dcbdc4d9 .hgtags
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1336
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1337
  +++ b/.hgtags	* (glob)
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1338
  @@ -0,0 +1,1 @@
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1339
  +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1340
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1341
(no rev)
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1342
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1343
  $ hg diff -r 'author("babar") or author("celeste")'
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1344
  abort: empty revision range
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1345
  [255]
97b2f26dfc43 revpair: smartset compatibility
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20798
diff changeset
  1346
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1347
aliases:
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1348
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1349
  $ echo '[revsetalias]' >> .hg/hgrc
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1350
  $ echo 'm = merge()' >> .hg/hgrc
24883
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1351
(revset aliases can override builtin revsets)
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1352
  $ echo 'p2($1) = p1($1)' >> .hg/hgrc
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1353
  $ echo 'sincem = descendants(m)' >> .hg/hgrc
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1354
  $ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1355
  $ echo 'rs(ARG1, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1356
  $ echo 'rs4(ARG1, ARGA, ARGB, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1357
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1358
  $ try m
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1359
  ('symbol', 'm')
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1360
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1361
    ('symbol', 'merge')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1362
    None)
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1363
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1364
  <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1365
    <fullreposet+ 0:9>>
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1366
  6
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1367
24892
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1368
  $ HGPLAIN=1
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1369
  $ export HGPLAIN
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1370
  $ try m
24883
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1371
  ('symbol', 'm')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1372
  abort: unknown revision 'm'!
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1373
  [255]
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1374
24892
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1375
  $ HGPLAINEXCEPT=revsetalias
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1376
  $ export HGPLAINEXCEPT
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1377
  $ try m
24883
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1378
  ('symbol', 'm')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1379
  (func
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1380
    ('symbol', 'merge')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1381
    None)
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1382
  * set:
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1383
  <filteredset
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1384
    <fullreposet+ 0:9>>
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1385
  6
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1386
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1387
  $ unset HGPLAIN
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1388
  $ unset HGPLAINEXCEPT
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1389
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1390
  $ try 'p2(.)'
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1391
  (func
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1392
    ('symbol', 'p2')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1393
    ('symbol', '.'))
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1394
  (func
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1395
    ('symbol', 'p1')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1396
    ('symbol', '.'))
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1397
  * set:
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1398
  <baseset+ [8]>
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1399
  8
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1400
24892
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1401
  $ HGPLAIN=1
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1402
  $ export HGPLAIN
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1403
  $ try 'p2(.)'
24883
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1404
  (func
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1405
    ('symbol', 'p2')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1406
    ('symbol', '.'))
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1407
  * set:
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1408
  <baseset+ []>
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1409
24892
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1410
  $ HGPLAINEXCEPT=revsetalias
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1411
  $ export HGPLAINEXCEPT
8cc6036bca53 tests: make tests with temporary environment setting portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24883
diff changeset
  1412
  $ try 'p2(.)'
24883
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1413
  (func
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1414
    ('symbol', 'p2')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1415
    ('symbol', '.'))
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1416
  (func
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1417
    ('symbol', 'p1')
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1418
    ('symbol', '.'))
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1419
  * set:
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1420
  <baseset+ [8]>
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1421
  8
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1422
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1423
  $ unset HGPLAIN
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1424
  $ unset HGPLAINEXCEPT
09049042ab99 ui: disable revsetaliases in plain mode (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 24708
diff changeset
  1425
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1426
test alias recursion
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1427
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1428
  $ try sincem
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1429
  ('symbol', 'sincem')
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1430
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1431
    ('symbol', 'descendants')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1432
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1433
      ('symbol', 'merge')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1434
      None))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1435
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1436
  <addset+
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1437
    <filteredset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1438
      <fullreposet+ 0:9>>,
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1439
    <generatorset+>>
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1440
  6
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1441
  7
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1442
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1443
test infinite recursion
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1444
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1445
  $ echo 'recurse1 = recurse2' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1446
  $ echo 'recurse2 = recurse1' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1447
  $ try recurse1
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1448
  ('symbol', 'recurse1')
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1449
  hg: parse error: infinite expansion of revset alias "recurse1" detected
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1450
  [255]
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1451
16772
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1452
  $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1453
  $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1454
  $ try "level2(level1(1, 2), 3)"
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1455
  (func
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1456
    ('symbol', 'level2')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1457
    (list
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1458
      (func
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1459
        ('symbol', 'level1')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1460
        (list
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1461
          ('symbol', '1')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1462
          ('symbol', '2')))
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1463
      ('symbol', '3')))
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1464
  (or
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1465
    ('symbol', '3')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1466
    (or
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1467
      ('symbol', '1')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1468
      ('symbol', '2')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1469
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1470
  <addset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1471
    <baseset [3]>,
25343
7fbef7932af9 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org>
parents: 25309
diff changeset
  1472
    <baseset [1, 2]>>
16772
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1473
  3
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1474
  1
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1475
  2
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
  1476
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1477
test nesting and variable passing
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1478
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1479
  $ echo 'nested($1) = nested2($1)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1480
  $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1481
  $ echo 'nested3($1) = max($1)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1482
  $ try 'nested(2:5)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1483
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1484
    ('symbol', 'nested')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1485
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1486
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1487
      ('symbol', '5')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1488
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1489
    ('symbol', 'max')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1490
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1491
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1492
      ('symbol', '5')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1493
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1494
  <baseset [5]>
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1495
  5
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1496
25309
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1497
test chained `or` operations are flattened at parsing phase
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1498
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1499
  $ echo 'chainedorops($1, $2, $3) = $1|$2|$3' >> .hg/hgrc
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1500
  $ try 'chainedorops(0:1, 1:2, 2:3)'
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1501
  (func
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1502
    ('symbol', 'chainedorops')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1503
    (list
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1504
      (list
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1505
        (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1506
          ('symbol', '0')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1507
          ('symbol', '1'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1508
        (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1509
          ('symbol', '1')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1510
          ('symbol', '2')))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1511
      (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1512
        ('symbol', '2')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1513
        ('symbol', '3'))))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1514
  (or
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1515
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1516
      ('symbol', '0')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1517
      ('symbol', '1'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1518
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1519
      ('symbol', '1')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1520
      ('symbol', '2'))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1521
    (range
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1522
      ('symbol', '2')
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1523
      ('symbol', '3')))
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1524
  * set:
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1525
  <addset
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1526
    <spanset+ 0:1>,
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1527
    <addset
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1528
      <spanset+ 1:2>,
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1529
      <spanset+ 2:3>>>
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1530
  0
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1531
  1
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1532
  2
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1533
  3
b333ca94403d revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org>
parents: 25295
diff changeset
  1534
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1535
test variable isolation, variable placeholders are rewritten as string
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1536
then parsed and matched again as string. Check they do not leak too
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1537
far away.
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1538
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1539
  $ echo 'injectparamasstring = max("$1")' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1540
  $ echo 'callinjection($1) = descendants(injectparamasstring)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1541
  $ try 'callinjection(2:5)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1542
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1543
    ('symbol', 'callinjection')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1544
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1545
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1546
      ('symbol', '5')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1547
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1548
    ('symbol', 'descendants')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1549
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1550
      ('symbol', 'max')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1551
      ('string', '$1')))
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1552
  abort: unknown revision '$1'!
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1553
  [255]
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
  1554
16771
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1555
  $ echo 'injectparamasstring2 = max(_aliasarg("$1"))' >> .hg/hgrc
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1556
  $ echo 'callinjection2($1) = descendants(injectparamasstring2)' >> .hg/hgrc
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1557
  $ try 'callinjection2(2:5)'
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1558
  (func
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1559
    ('symbol', 'callinjection2')
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1560
    (range
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1561
      ('symbol', '2')
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1562
      ('symbol', '5')))
24222
02d7b5cd373b dispatch: offer suggestions of similar-named commands
Augie Fackler <augie@google.com>
parents: 24221
diff changeset
  1563
  abort: failed to parse the definition of revset alias "injectparamasstring2": unknown identifier: _aliasarg
16771
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1564
  [255]
23725
6a81f88758aa revset: delay showing parse error for the revset alias until it is referred
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23062
diff changeset
  1565
  $ hg debugrevspec --debug --config revsetalias.anotherbadone='branch(' "tip"
6a81f88758aa revset: delay showing parse error for the revset alias until it is referred
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23062
diff changeset
  1566
  ('symbol', 'tip')
23844
ddf2172e901d revset: store full detail into revsetalias.error for error source distinction
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23833
diff changeset
  1567
  warning: failed to parse the definition of revset alias "anotherbadone": at 7: not a prefix: end
24222
02d7b5cd373b dispatch: offer suggestions of similar-named commands
Augie Fackler <augie@google.com>
parents: 24221
diff changeset
  1568
  warning: failed to parse the definition of revset alias "injectparamasstring2": unknown identifier: _aliasarg
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1569
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1570
  <baseset [9]>
23725
6a81f88758aa revset: delay showing parse error for the revset alias until it is referred
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23062
diff changeset
  1571
  9
16771
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1572
  >>> data = file('.hg/hgrc', 'rb').read()
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1573
  >>> file('.hg/hgrc', 'wb').write(data.replace('_aliasarg', ''))
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
  1574
23725
6a81f88758aa revset: delay showing parse error for the revset alias until it is referred
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23062
diff changeset
  1575
  $ try 'tip'
6a81f88758aa revset: delay showing parse error for the revset alias until it is referred
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23062
diff changeset
  1576
  ('symbol', 'tip')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1577
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1578
  <baseset [9]>
23725
6a81f88758aa revset: delay showing parse error for the revset alias until it is referred
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23062
diff changeset
  1579
  9
23846
aac4a1a7920e revset: parse alias declaration strictly by _parsealiasdecl
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23844
diff changeset
  1580
aac4a1a7920e revset: parse alias declaration strictly by _parsealiasdecl
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23844
diff changeset
  1581
  $ hg debugrevspec --debug --config revsetalias.'bad name'='tip' "tip"
aac4a1a7920e revset: parse alias declaration strictly by _parsealiasdecl
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23844
diff changeset
  1582
  ('symbol', 'tip')
aac4a1a7920e revset: parse alias declaration strictly by _parsealiasdecl
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23844
diff changeset
  1583
  warning: failed to parse the declaration of revset alias "bad name": at 4: invalid token
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1584
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1585
  <baseset [9]>
23846
aac4a1a7920e revset: parse alias declaration strictly by _parsealiasdecl
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23844
diff changeset
  1586
  9
23994
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1587
  $ echo 'strictreplacing($1, $10) = $10 or desc("$1")' >> .hg/hgrc
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1588
  $ try 'strictreplacing("foo", tip)'
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1589
  (func
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1590
    ('symbol', 'strictreplacing')
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1591
    (list
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1592
      ('string', 'foo')
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1593
      ('symbol', 'tip')))
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1594
  (or
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1595
    ('symbol', 'tip')
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1596
    (func
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1597
      ('symbol', 'desc')
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1598
      ('string', '$1')))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1599
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1600
  <addset
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1601
    <baseset [9]>,
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1602
    <filteredset
25129
40a2cf1c765b revset: drop redundant filteredset from right-hand side set of "or" operation
Yuya Nishihara <yuya@tcha.org>
parents: 25105
diff changeset
  1603
      <fullreposet+ 0:9>>>
23994
8a2156780839 revset: replace parsing alias definition by _parsealiasdefn to parse strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23978
diff changeset
  1604
  9
23846
aac4a1a7920e revset: parse alias declaration strictly by _parsealiasdecl
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23844
diff changeset
  1605
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1606
  $ try 'd(2:5)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1607
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1608
    ('symbol', 'd')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1609
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1610
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1611
      ('symbol', '5')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1612
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1613
    ('symbol', 'reverse')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1614
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1615
      ('symbol', 'sort')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1616
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1617
        (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1618
          ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1619
          ('symbol', '5'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1620
        ('symbol', 'date'))))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1621
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1622
  <baseset [4, 5, 3, 2]>
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1623
  4
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1624
  5
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1625
  3
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1626
  2
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1627
  $ try 'rs(2 or 3, date)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1628
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1629
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1630
    (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1631
      (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1632
        ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1633
        ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1634
      ('symbol', 'date')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1635
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1636
    ('symbol', 'reverse')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1637
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1638
      ('symbol', 'sort')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1639
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1640
        (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1641
          ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1642
          ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1643
        ('symbol', 'date'))))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1644
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1645
  <baseset [3, 2]>
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1646
  3
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
  1647
  2
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1648
  $ try 'rs()'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1649
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1650
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1651
    None)
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1652
  hg: parse error: invalid number of arguments: 0
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1653
  [255]
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1654
  $ try 'rs(2)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1655
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1656
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1657
    ('symbol', '2'))
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1658
  hg: parse error: invalid number of arguments: 1
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1659
  [255]
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1660
  $ try 'rs(2, data, 7)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1661
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1662
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1663
    (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1664
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1665
        ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1666
        ('symbol', 'data'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1667
      ('symbol', '7')))
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1668
  hg: parse error: invalid number of arguments: 3
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1669
  [255]
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1670
  $ try 'rs4(2 or 3, x, x, date)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1671
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1672
    ('symbol', 'rs4')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1673
    (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1674
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1675
        (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1676
          (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1677
            ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1678
            ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1679
          ('symbol', 'x'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1680
        ('symbol', 'x'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1681
      ('symbol', 'date')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1682
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1683
    ('symbol', 'reverse')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1684
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1685
      ('symbol', 'sort')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1686
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1687
        (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1688
          ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1689
          ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
  1690
        ('symbol', 'date'))))
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1691
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1692
  <baseset [3, 2]>
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1693
  3
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
  1694
  2
14153
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1695
24175
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1696
issue4553: check that revset aliases override existing hash prefix
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1697
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1698
  $ hg log -qr e
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1699
  6:e0cc66ef77e8
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1700
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1701
  $ hg log -qr e --config revsetalias.e="all()"
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1702
  0:2785f51eece5
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1703
  1:d75937da8da0
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1704
  2:5ed5505e9f1c
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1705
  3:8528aa5637f2
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1706
  4:2326846efdab
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1707
  5:904fa392b941
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1708
  6:e0cc66ef77e8
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1709
  7:013af1973af4
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1710
  8:d5d0dcbdc4d9
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1711
  9:24286f4ae135
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1712
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1713
  $ hg log -qr e: --config revsetalias.e="0"
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1714
  0:2785f51eece5
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1715
  1:d75937da8da0
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1716
  2:5ed5505e9f1c
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1717
  3:8528aa5637f2
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1718
  4:2326846efdab
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1719
  5:904fa392b941
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1720
  6:e0cc66ef77e8
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1721
  7:013af1973af4
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1722
  8:d5d0dcbdc4d9
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1723
  9:24286f4ae135
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1724
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1725
  $ hg log -qr :e --config revsetalias.e="9"
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1726
  0:2785f51eece5
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1727
  1:d75937da8da0
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1728
  2:5ed5505e9f1c
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1729
  3:8528aa5637f2
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1730
  4:2326846efdab
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1731
  5:904fa392b941
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1732
  6:e0cc66ef77e8
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1733
  7:013af1973af4
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1734
  8:d5d0dcbdc4d9
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1735
  9:24286f4ae135
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1736
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1737
  $ hg log -qr e:
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1738
  6:e0cc66ef77e8
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1739
  7:013af1973af4
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1740
  8:d5d0dcbdc4d9
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1741
  9:24286f4ae135
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1742
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1743
  $ hg log -qr :e
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1744
  0:2785f51eece5
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1745
  1:d75937da8da0
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1746
  2:5ed5505e9f1c
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1747
  3:8528aa5637f2
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1748
  4:2326846efdab
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1749
  5:904fa392b941
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1750
  6:e0cc66ef77e8
c4e3e7b031b7 revrange: don't parse revset aliases as hash prefixes (issue4553)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24163
diff changeset
  1751
14153
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1752
issue2549 - correct optimizations
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1753
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1754
  $ log 'limit(1 or 2 or 3, 2) and not 2'
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1755
  1
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1756
  $ log 'max(1 or 2) and not 2'
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1757
  $ log 'min(1 or 2) and not 1'
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
  1758
  $ log 'last(1 or 2, 1) and not 2'
15726
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1759
21870
dd716807fd23 revset: maintain ordering when subtracting from a baseset (issue4289)
Matt Mackall <mpm@selenic.com>
parents: 21024
diff changeset
  1760
issue4289 - ordering of built-ins
dd716807fd23 revset: maintain ordering when subtracting from a baseset (issue4289)
Matt Mackall <mpm@selenic.com>
parents: 21024
diff changeset
  1761
  $ hg log -M -q -r 3:2
dd716807fd23 revset: maintain ordering when subtracting from a baseset (issue4289)
Matt Mackall <mpm@selenic.com>
parents: 21024
diff changeset
  1762
  3:8528aa5637f2
dd716807fd23 revset: maintain ordering when subtracting from a baseset (issue4289)
Matt Mackall <mpm@selenic.com>
parents: 21024
diff changeset
  1763
  2:5ed5505e9f1c
dd716807fd23 revset: maintain ordering when subtracting from a baseset (issue4289)
Matt Mackall <mpm@selenic.com>
parents: 21024
diff changeset
  1764
17858
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1765
test revsets started with 40-chars hash (issue3669)
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1766
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1767
  $ ISSUE3669_TIP=`hg tip --template '{node}'`
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1768
  $ hg log -r "${ISSUE3669_TIP}" --template '{rev}\n'
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1769
  9
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1770
  $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n'
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1771
  8
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
  1772
18473
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1773
test or-ed indirect predicates (issue3775)
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1774
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1775
  $ log '6 or 6^1' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1776
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1777
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1778
  $ log '6^1 or 6' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1779
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1780
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1781
  $ log '4 or 4~1' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1782
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1783
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1784
  $ log '4~1 or 4' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1785
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1786
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1787
  $ log '(0 or 2):(4 or 6) or 0 or 6' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1788
  0
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1789
  1
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1790
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1791
  3
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1792
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1793
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1794
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1795
  $ log '0 or 6 or (0 or 2):(4 or 6)' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1796
  0
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1797
  1
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1798
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1799
  3
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1800
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1801
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1802
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
  1803
16008
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1804
tests for 'remote()' predicate:
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1805
#.  (csets in remote) (id)            (remote)
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1806
1.  less than local   current branch  "default"
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1807
2.  same with local   specified       "default"
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1808
3.  more than local   specified       specified
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1809
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1810
  $ hg clone --quiet -U . ../remote3
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1811
  $ cd ../remote3
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1812
  $ hg update -q 7
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1813
  $ echo r > r
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1814
  $ hg ci -Aqm 10
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1815
  $ log 'remote()'
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1816
  7
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1817
  $ log 'remote("a-b-c-")'
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1818
  2
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1819
  $ cd ../repo
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1820
  $ log 'remote(".a.b.c.", "../remote3")'
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
  1821
23742
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1822
tests for concatenation of strings/symbols by "##"
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1823
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1824
  $ try "278 ## '5f5' ## 1ee ## 'ce5'"
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1825
  (_concat
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1826
    (_concat
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1827
      (_concat
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1828
        ('symbol', '278')
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1829
        ('string', '5f5'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1830
      ('symbol', '1ee'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1831
    ('string', 'ce5'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1832
  ('string', '2785f51eece5')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1833
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1834
  <baseset [0]>
23742
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1835
  0
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1836
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1837
  $ echo 'cat4($1, $2, $3, $4) = $1 ## $2 ## $3 ## $4' >> .hg/hgrc
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1838
  $ try "cat4(278, '5f5', 1ee, 'ce5')"
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1839
  (func
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1840
    ('symbol', 'cat4')
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1841
    (list
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1842
      (list
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1843
        (list
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1844
          ('symbol', '278')
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1845
          ('string', '5f5'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1846
        ('symbol', '1ee'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1847
      ('string', 'ce5')))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1848
  (_concat
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1849
    (_concat
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1850
      (_concat
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1851
        ('symbol', '278')
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1852
        ('string', '5f5'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1853
      ('symbol', '1ee'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1854
    ('string', 'ce5'))
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1855
  ('string', '2785f51eece5')
24458
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1856
  * set:
7d87f672d069 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org>
parents: 24419
diff changeset
  1857
  <baseset [0]>
23742
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1858
  0
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1859
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1860
(check concatenation in alias nesting)
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1861
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1862
  $ echo 'cat2($1, $2) = $1 ## $2' >> .hg/hgrc
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1863
  $ echo 'cat2x2($1, $2, $3, $4) = cat2($1 ## $2, $3 ## $4)' >> .hg/hgrc
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1864
  $ log "cat2x2(278, '5f5', 1ee, 'ce5')"
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1865
  0
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1866
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1867
(check operator priority)
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1868
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1869
  $ echo 'cat2n2($1, $2, $3, $4) = $1 ## $2 or $3 ## $4~2' >> .hg/hgrc
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1870
  $ log "cat2n2(2785f5, 1eece5, 24286f, 4ae135)"
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1871
  0
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1872
  4
3a4d8a6ce432 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 23725
diff changeset
  1873
15726
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1874
  $ cd ..
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1875
25265
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1876
prepare repository that has "default" branches of multiple roots
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1877
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1878
  $ hg init namedbranch
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1879
  $ cd namedbranch
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1880
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1881
  $ echo default0 >> a
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1882
  $ hg ci -Aqm0
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1883
  $ echo default1 >> a
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1884
  $ hg ci -m1
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1885
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1886
  $ hg branch -q stable
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1887
  $ echo stable2 >> a
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1888
  $ hg ci -m2
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1889
  $ echo stable3 >> a
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1890
  $ hg ci -m3
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1891
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1892
  $ hg update -q null
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1893
  $ echo default4 >> a
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1894
  $ hg ci -Aqm4
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1895
  $ echo default5 >> a
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1896
  $ hg ci -m5
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1897
25266
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1898
"null" revision belongs to "default" branch (issue4683)
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1899
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1900
  $ log 'branch(null)'
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1901
  0
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1902
  1
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1903
  4
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1904
  5
38117278f295 revbranchcache: return uncached branchinfo for nullrev (issue4683)
Yuya Nishihara <yuya@tcha.org>
parents: 25265
diff changeset
  1905
25265
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1906
"null" revision belongs to "default" branch, but it shouldn't appear in set
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1907
unless explicitly specified (issue4682)
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1908
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1909
  $ log 'children(branch(default))'
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1910
  1
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1911
  2
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1912
  5
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1913
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1914
  $ cd ..
e16456831516 revset: drop magic of fullreposet membership test (issue4682)
Yuya Nishihara <yuya@tcha.org>
parents: 25094
diff changeset
  1915
15726
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1916
test author/desc/keyword in problematic encoding
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1917
# unicode: cp932:
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1918
# u30A2    0x83 0x41(= 'A')
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1919
# u30C2    0x83 0x61(= 'a')
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1920
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1921
  $ hg init problematicencoding
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1922
  $ cd problematicencoding
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1923
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1924
  $ python > setup.sh <<EOF
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1925
  > print u'''
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1926
  > echo a > text
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1927
  > hg add text
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1928
  > hg --encoding utf-8 commit -u '\u30A2' -m none
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1929
  > echo b > text
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1930
  > hg --encoding utf-8 commit -u '\u30C2' -m none
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1931
  > echo c > text
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1932
  > hg --encoding utf-8 commit -u none -m '\u30A2'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1933
  > echo d > text
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1934
  > hg --encoding utf-8 commit -u none -m '\u30C2'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1935
  > '''.encode('utf-8')
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1936
  > EOF
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1937
  $ sh < setup.sh
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1938
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1939
test in problematic encoding
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1940
  $ python > test.sh <<EOF
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1941
  > print u'''
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1942
  > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1943
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1944
  > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30C2)'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1945
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1946
  > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30A2)'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1947
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1948
  > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30C2)'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1949
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1950
  > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30A2)'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1951
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1952
  > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30C2)'
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1953
  > '''.encode('cp932')
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1954
  > EOF
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1955
  $ sh < test.sh
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1956
  0
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1957
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1958
  1
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1959
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1960
  2
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1961
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1962
  3
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1963
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1964
  0
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1965
  2
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1966
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1967
  1
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1968
  3
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1969
24707
57f58f96f850 revsets: show current revset abort behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 24459
diff changeset
  1970
test error message of bad revset
57f58f96f850 revsets: show current revset abort behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 24459
diff changeset
  1971
  $ hg log -r 'foo\\'
24708
fb47816e1a9c revsets: more informative syntax error message
Ryan McElroy <rmcelroy@fb.com>
parents: 24707
diff changeset
  1972
  hg: parse error at 3: syntax error in revset 'foo\\'
24707
57f58f96f850 revsets: show current revset abort behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 24459
diff changeset
  1973
  [255]
57f58f96f850 revsets: show current revset abort behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 24459
diff changeset
  1974
15726
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
  1975
  $ cd ..