tests/test-revset.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 17 Jan 2014 23:55:03 +0900
changeset 20288 b61ad01c4e73
parent 20286 760151697a4f
child 20393 b0638b5b004d
permissions -rw-r--r--
revset: use "canonpath()" for "filelog()" pattern without explicit kind Before this patch, revset predicate "filelog()" uses "match.files()" to get filename also for the pattern without explicit kind. But in such case, only canonicalization of relative path is required, and other initializations of "match" object including regexp compilation are meaningless. This patch uses "pathutil.canonpath()" directly for "filelog()" pattern without explicit kind like "glob:", for efficiency. This patch also does below as a part of introducing "canonpath()": - move location of "matchmod.match()" invocation, because "m" is no more used in "if not matchmod.patkind(pat)" code path - omit passing "default" argument to "matchmod.match()", because "pat" should have explicit kind of pattern in this code path
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
11409
7a6ac83a15b0 revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
     3
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
     4
  $ try() {
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
     5
  >   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
     6
  > }
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
     7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
     8
  $ log() {
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
     9
  >   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
    10
  > }
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    11
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    12
  $ 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
    13
  $ cd repo
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    14
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    15
  $ 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
    16
  $ 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
    17
  marked working directory as branch a
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    18
  (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
    19
  $ 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
    20
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    21
  $ 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
    22
  $ 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
    23
  marked working directory as branch b
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    24
  (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
    25
  $ hg ci -Aqm1
11409
7a6ac83a15b0 revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
    26
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    27
  $ rm a
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    28
  $ 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
    29
  marked working directory as branch a-b-c-
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    30
  (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
    31
  $ hg ci -Aqm2 -u Bob
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    32
16661
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    33
  $ 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
    34
  2
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    35
  $ 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
    36
  0
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    37
  1
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    38
  2
16824
f3b8c82a559c revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents: 16823
diff changeset
    39
  $ 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
    40
  0 a
f3b8c82a559c revset: add pattern matching to 'extra' revset expression
Simon King <simon@simonking.org.uk>
parents: 16823
diff changeset
    41
  2 a-b-c-
16661
de4b42daf396 revset: add function for matching extra data (issue2767)
Henrik Stuart <hg@hstuart.dk>
parents: 16640
diff changeset
    42
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    43
  $ 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
    44
  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
    45
  $ 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
    46
  marked working directory as branch +a+b+c+
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    47
  (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
    48
  $ hg ci -Aqm3
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    49
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    50
  $ 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
    51
  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
    52
  $ 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
    53
  $ 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
    54
  marked working directory as branch -a-b-c-
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    55
  (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
    56
  $ hg ci -Aqm4 -d "May 12 2005"
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    57
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    58
  $ 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
    59
  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
    60
  $ hg branch !a/b/c/
c739227b5eea test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16824
diff changeset
    61
  marked working directory as branch !a/b/c/
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    62
  (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
    63
  $ 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
    64
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    65
  $ 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
    66
  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
    67
  (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
    68
  $ 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
    69
  marked working directory as branch _a_b_c_
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    70
  (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
    71
  $ hg ci -Aqm"6 issue619"
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    72
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    73
  $ 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
    74
  marked working directory as branch .a.b.c.
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    75
  (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
    76
  $ 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
    77
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    78
  $ 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
    79
  marked working directory as branch all
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    80
  (branches are permanent and global, did you want a bookmark?)
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    81
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    82
  $ 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
    83
  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
    84
  $ hg branch é
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12786
diff changeset
    85
  marked working directory as branch \xc3\xa9 (esc)
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14723
diff changeset
    86
  (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
    87
  $ hg ci -Aqm9
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 tag -r6 1.0
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    90
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    91
  $ 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
    92
  $ 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
    93
  $ 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
    94
  $ 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
    95
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    96
names that should work without quoting
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
    97
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    98
  $ try a
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
    99
  ('symbol', 'a')
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   100
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   101
  $ try b-a
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   102
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   103
    ('symbol', 'b')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   104
    ('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
   105
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   106
  $ 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
   107
  ('symbol', '_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
   108
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   109
  $ try _a_b_c_-a
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   110
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   111
    ('symbol', '_a_b_c_')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   112
    ('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
   113
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   114
  $ 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
   115
  ('symbol', '.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
   116
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   117
  $ try .a.b.c.-a
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   118
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   119
    ('symbol', '.a.b.c.')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   120
    ('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
   121
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   122
  $ 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
   123
  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
   124
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   125
  $ 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
   126
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   127
  $ try -- -a-b-c--a # complains
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   128
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   129
    (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   130
      (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   131
        (negate
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   132
          ('symbol', 'a'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   133
        ('symbol', 'b'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   134
      ('symbol', 'c'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   135
    (negate
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   136
      ('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
   137
  abort: unknown revision '-a'!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   138
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   139
  $ try é
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   140
  ('symbol', '\xc3\xa9')
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   141
  9
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   142
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   143
quoting needed
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   144
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   145
  $ try '"-a-b-c-"-a'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   146
  (minus
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   147
    ('string', '-a-b-c-')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   148
    ('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
   149
  4
11882
b75dea24e296 revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 11650
diff changeset
   150
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   151
  $ 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
   152
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   153
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   154
  $ 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
   155
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   156
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   157
  $ 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
   158
  $ 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
   159
  $ try '1&2|3' # precedence - and is higher
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   160
  (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   161
    (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   162
      ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   163
      ('symbol', '2'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   164
    ('symbol', '3'))
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   165
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   166
  $ try '1|2&3'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   167
  (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   168
    ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   169
    (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   170
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   171
      ('symbol', '3')))
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   172
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   173
  $ try '1&2&3' # associativity
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   174
  (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   175
    (and
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   176
      ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   177
      ('symbol', '2'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   178
    ('symbol', '3'))
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   179
  $ try '1|(2|3)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   180
  (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   181
    ('symbol', '1')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   182
    (group
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   183
      (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   184
        ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   185
        ('symbol', '3'))))
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   186
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   187
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   188
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   189
  $ 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
   190
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   191
  $ 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
   192
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   193
  $ log '2785f51ee'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   194
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   195
  $ 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
   196
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   197
  $ 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
   198
  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
   199
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   200
  $ log 'date()'
12736
7e14e67e6622 revset: use 'requires' instead of 'wants' in error message
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 12716
diff changeset
   201
  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
   202
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   203
  $ log 'date'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   204
  hg: parse error: can't use date here
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   205
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   206
  $ log 'date('
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   207
  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
   208
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   209
  $ 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
   210
  abort: invalid date: 'tip'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   211
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   212
  $ log '"date"'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   213
  abort: unknown revision 'date'!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12105
diff changeset
   214
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   215
  $ 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
   216
  4
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   217
18536
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   218
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
   219
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   220
  $ 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
   221
  $ log 'ancestor(1)'
18536
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   222
  1
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 '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
   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
  $ 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
   226
  $ 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
   227
  0
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   228
  $ 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
   229
  1
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   230
  $ 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
   231
  0
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   232
  $ 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
   233
  1
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   234
  $ 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
   235
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   236
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   237
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   238
  5
18536
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   239
  $ log 'ancestor(ancestors(5))'
ae645d4f084c revset: change ancestor to accept 0 or more arguments (issue3750)
Paul Cavallaro <ptc@fb.com>
parents: 18473
diff changeset
   240
  0
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   241
  $ 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
   242
  2
16823
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   243
  $ 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
   244
  0
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   245
  1
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   246
  2
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   247
  3
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   248
  4
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   249
  5
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   250
  6
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   251
  7
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   252
  8
b23bacb230c9 revset: add pattern matching to the 'user' revset expression
Simon King <simon@simonking.org.uk>
parents: 16821
diff changeset
   253
  9
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   254
  $ log 'branch(é)'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   255
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   256
  9
16821
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   257
  $ log 'branch(a)'
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   258
  0
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   259
  $ 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
   260
  0 a
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   261
  2 a-b-c-
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   262
  3 +a+b+c+
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   263
  4 -a-b-c-
16851
c739227b5eea test-revset: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16824
diff changeset
   264
  5 !a/b/c/
16821
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   265
  6 _a_b_c_
0946502fd3d5 revset: add pattern matching to 'branch' revset expression
Simon King <simon@simonking.org.uk>
parents: 16820
diff changeset
   266
  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
   267
  $ 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
   268
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   269
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   270
  $ log 'closed()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   271
  $ 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
   272
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   273
  1
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
  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
   276
  $ 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
   277
  0
760151697a4f revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19706
diff changeset
   278
  1
760151697a4f revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19706
diff changeset
   279
  3
760151697a4f revset: make default kind of pattern for "contains()" rooted at cwd
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19706
diff changeset
   280
  5
14650
93731b3efd0d revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14153
diff changeset
   281
  $ log 'desc(B)'
93731b3efd0d revset: add desc(string) to search in commit messages
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14153
diff changeset
   282
  5
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   283
  $ 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
   284
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   285
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   286
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   287
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   288
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   289
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   290
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   291
  9
16411
4c2edcd84175 graphlog: correctly handle calls in subdirectories
Patrick Mezard <patrick@mezard.eu>
parents: 16218
diff changeset
   292
  $ 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
   293
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   294
  4
20288
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   295
  $ log 'filelog("b")'
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   296
  1
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   297
  4
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   298
  $ 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
   299
  1
b61ad01c4e73 revset: use "canonpath()" for "filelog()" pattern without explicit kind
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20286
diff changeset
   300
  4
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   301
  $ log 'follow()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   302
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   303
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   304
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   305
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   306
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   307
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   308
  $ 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
   309
  6
12321
11db6fa2961e merge with stable
Martin Geisler <mg@aragost.com>
parents: 12320 12316
diff changeset
   310
  $ try 'grep("(")' # invalid regular expression
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   311
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   312
    ('symbol', 'grep')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   313
    ('string', '('))
12321
11db6fa2961e merge with stable
Martin Geisler <mg@aragost.com>
parents: 12320 12316
diff changeset
   314
  hg: parse error: invalid match pattern: unbalanced parenthesis
11db6fa2961e merge with stable
Martin Geisler <mg@aragost.com>
parents: 12320 12316
diff changeset
   315
  [255]
12408
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   316
  $ try 'grep("\bissue\d+")'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   317
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   318
    ('symbol', 'grep')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   319
    ('string', '\x08issue\\d+'))
12408
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   320
  $ try 'grep(r"\bissue\d+")'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   321
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   322
    ('symbol', 'grep')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   323
    ('string', '\\bissue\\d+'))
12408
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   324
  6
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   325
  $ try 'grep(r"\")'
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   326
  hg: parse error at 7: unterminated string
78a97859b90d revset: support raw string literals
Brodie Rao <brodie@bitheap.org>
parents: 12321
diff changeset
   327
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   328
  $ log 'head()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   329
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   330
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   331
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   332
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   333
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   334
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   335
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   336
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   337
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   338
  $ 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
   339
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   340
  $ 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
   341
  6
19706
26ddce1a2a55 revset: fix wrong keyword() behaviour for strings with spaces
Alexander Plavin <alexander@plav.in>
parents: 18955
diff changeset
   342
  $ 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
   343
  $ 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
   344
  0
16447
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   345
  $ log 'matching(6)'
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   346
  6
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   347
  $ 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
   348
  6
60c379da12aa tests: add tests for matching keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16415
diff changeset
   349
  7
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   350
  $ 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
   351
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   352
  $ 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
   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
  $ log 'merge()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   355
  6
17753
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   356
  $ log 'branchpoint()'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   357
  1
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   358
  4
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   359
  $ 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
   360
  4
16521
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   361
  $ log 'modifies("path:b")'
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   362
  4
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   363
  $ log 'modifies("*")'
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   364
  4
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   365
  6
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   366
  $ log 'modifies("set:modified()")'
592701c8eac6 revset: fix adds/modifies/removes and patterns (issue3403)
Patrick Mezard <patrick@mezard.eu>
parents: 16447
diff changeset
   367
  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
   368
  $ 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
   369
  2
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   370
  $ log 'outgoing()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   371
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   372
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   373
  $ 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
   374
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   375
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   376
  $ 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
   377
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   378
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   379
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   380
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   381
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   382
  $ 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
   383
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   384
  $ 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
   385
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   386
  $ 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
   387
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   388
  5
17753
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   389
  $ log 'p1(branchpoint())'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   390
  0
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   391
  2
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   392
  $ log 'p2(branchpoint())'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   393
  $ log 'parents(branchpoint())'
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   394
  0
69d5078d760d revsets: add branchpoint() function
Ivan Andrus <darthandrus@gmail.com>
parents: 17100
diff changeset
   395
  2
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   396
  $ 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
   397
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   398
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   399
  $ 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
   400
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   401
  $ 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
   402
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   403
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   404
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   405
  2
17100
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   406
  $ log 'reverse(all())'
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   407
  9
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   408
  8
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   409
  7
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   410
  6
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   411
  5
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   412
  4
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   413
  3
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   414
  2
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   415
  1
ee2370d866fc revset: ensure we are reversing a list (issue3530)
Bryan O'Sullivan <bryano@fb.com>
parents: 16851
diff changeset
   416
  0
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
   417
  $ 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
   418
  5
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   419
  $ log '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
   420
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   421
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   422
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   423
  $ 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
   424
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   425
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   426
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   427
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   428
  $ log 'tagged()'
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   429
  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
   430
  $ 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
   431
  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
   432
  $ 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
   433
  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
   434
  $ 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
   435
  9
16820
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   436
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   437
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
   438
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   439
  $ log 'tag("1..*")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   440
  abort: tag '1..*' does not exist
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   441
  [255]
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   442
  $ log 'tag("re:1..*")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   443
  6
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   444
  $ 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
   445
  6
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   446
  $ log 'tag("literal:1.0")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   447
  6
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   448
  $ log 'tag("re:0..*")'
20f55613fb2a revset: add pattern matching to 'tag' revset expression
Simon King <simon@simonking.org.uk>
parents: 16778
diff changeset
   449
13925
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
   450
  $ log 'tag(unknown)'
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
   451
  abort: tag 'unknown' does not exist
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
   452
  [255]
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
   453
  $ log 'branch(unknown)'
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
   454
  abort: unknown revision 'unknown'!
c315ffc13a25 tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents: 13665
diff changeset
   455
  [255]
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   456
  $ 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
   457
  2
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   458
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   459
  $ 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
   460
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   461
  8
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   462
  $ 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
   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
  8
11419
3cc2e34d7a7d tests: extend revset test
Matt Mackall <mpm@selenic.com>
parents: 11409
diff changeset
   468
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   469
  $ 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
   470
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   471
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   472
  5
11456
88abbb046e66 revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents: 11419
diff changeset
   473
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   474
  $ 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
   475
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   476
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   477
  $ 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
   478
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   479
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   480
  $ 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
   481
  0
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   482
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   483
  $ 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
   484
  $ 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
   485
  $ 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
   486
  $ 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
   487
  9
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   488
  7
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   489
  6
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   490
  5
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   491
  4
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   492
  3
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   493
  2
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   494
  1
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12103
diff changeset
   495
  0
12616
e797fdf91df4 revset: lower precedence of minus infix (issue2361)
Matt Mackall <mpm@selenic.com>
parents: 12408
diff changeset
   496
  $ log '4::8 - 8'
e797fdf91df4 revset: lower precedence of minus infix (issue2361)
Matt Mackall <mpm@selenic.com>
parents: 12408
diff changeset
   497
  4
16640
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
   498
  $ 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
   499
  2
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
   500
  3
592e0beee8b0 revset: make matching() preserve input revision order
Patrick Mezard <patrick@mezard.eu>
parents: 16521
diff changeset
   501
  1
12786
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   502
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   503
issue2437
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   504
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   505
  $ log '3 and p1(5)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   506
  3
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   507
  $ log '4 and p2(6)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   508
  4
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   509
  $ log '1 and parents(:2)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   510
  1
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   511
  $ log '2 and children(1:)'
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   512
  2
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   513
  $ 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
   514
  0
16394
f3df7d34791e revset: do not ignore input revisions in roots()
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   515
  $ 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
   516
  0
12786
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   517
  $ 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
   518
  9
9aae04f4fcf6 revset: disable subset optimization for parents() and children() (issue2437)
Wagner Bruna <wbruna@yahoo.com>
parents: 12736
diff changeset
   519
  $ 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
   520
  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
   521
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
   522
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
   523
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
   524
  $ 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
   525
  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
   526
  [255]
e798e430c5e5 revset: report a parse error if a revset is not parsed completely (issue2654)
Bernhard Leiner <bleiner@gmail.com>
parents: 12942
diff changeset
   527
13932
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
   528
or operator should preserve ordering:
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
   529
  $ log 'reverse(2::4) or tip'
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
   530
  4
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
   531
  2
34f577007ffe revsets: preserve ordering with the or operator
Augie Fackler <durin42@gmail.com>
parents: 13925
diff changeset
   532
  9
14070
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   533
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   534
parentrevspec
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   535
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   536
  $ log 'merge()^0'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   537
  6
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   538
  $ log 'merge()^'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   539
  5
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   540
  $ log 'merge()^1'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   541
  5
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   542
  $ log 'merge()^2'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   543
  4
14080
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   544
  $ log 'merge()^^'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   545
  3
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   546
  $ log 'merge()^1^'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   547
  3
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   548
  $ log 'merge()^^^'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   549
  1
14070
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   550
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   551
  $ log 'merge()~0'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   552
  6
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   553
  $ log 'merge()~1'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   554
  5
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   555
  $ log 'merge()~2'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   556
  3
14080
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   557
  $ log 'merge()~2^1'
debe5083a84e revset: add tests for multiple and mixed ^ and ~ operators
Kevin Gessner <kevin@kevingessner.com>
parents: 14070
diff changeset
   558
  1
14070
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   559
  $ log 'merge()~3'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   560
  1
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   561
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   562
  $ log '(-3:tip)^'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   563
  4
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   564
  6
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   565
  8
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   566
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   567
  $ log 'tip^foo'
305c97670d7a revset: add ^ and ~ operators from parentrevspec extension
Kevin Gessner <kevin@kevingessner.com>
parents: 13932
diff changeset
   568
  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
   569
  [255]
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   570
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   571
aliases:
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   572
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   573
  $ echo '[revsetalias]' >> .hg/hgrc
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   574
  $ echo 'm = merge()' >> .hg/hgrc
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   575
  $ echo 'sincem = descendants(m)' >> .hg/hgrc
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   576
  $ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   577
  $ 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
   578
  $ 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
   579
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   580
  $ try m
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   581
  ('symbol', 'm')
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   582
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   583
    ('symbol', 'merge')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   584
    None)
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   585
  6
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   586
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   587
test alias recursion
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   588
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   589
  $ try sincem
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   590
  ('symbol', 'sincem')
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   591
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   592
    ('symbol', 'descendants')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   593
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   594
      ('symbol', 'merge')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   595
      None))
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   596
  6
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   597
  7
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   598
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   599
test infinite recursion
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   600
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   601
  $ echo 'recurse1 = recurse2' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   602
  $ echo 'recurse2 = recurse1' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   603
  $ try recurse1
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   604
  ('symbol', 'recurse1')
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   605
  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
   606
  [255]
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   607
16772
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   608
  $ 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
   609
  $ 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
   610
  $ try "level2(level1(1, 2), 3)"
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   611
  (func
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   612
    ('symbol', 'level2')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   613
    (list
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   614
      (func
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   615
        ('symbol', 'level1')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   616
        (list
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   617
          ('symbol', '1')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   618
          ('symbol', '2')))
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   619
      ('symbol', '3')))
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   620
  (or
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   621
    ('symbol', '3')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   622
    (or
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   623
      ('symbol', '1')
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   624
      ('symbol', '2')))
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   625
  3
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   626
  1
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   627
  2
30e46d7138de revset: fix infinite alias expansion detection
Patrick Mezard <patrick@mezard.eu>
parents: 16771
diff changeset
   628
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   629
test nesting and variable passing
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   630
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   631
  $ echo 'nested($1) = nested2($1)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   632
  $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   633
  $ echo 'nested3($1) = max($1)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   634
  $ try 'nested(2:5)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   635
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   636
    ('symbol', 'nested')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   637
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   638
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   639
      ('symbol', '5')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   640
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   641
    ('symbol', 'max')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   642
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   643
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   644
      ('symbol', '5')))
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   645
  5
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   646
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   647
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
   648
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
   649
far away.
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   650
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   651
  $ echo 'injectparamasstring = max("$1")' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   652
  $ echo 'callinjection($1) = descendants(injectparamasstring)' >> .hg/hgrc
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   653
  $ try 'callinjection(2:5)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   654
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   655
    ('symbol', 'callinjection')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   656
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   657
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   658
      ('symbol', '5')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   659
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   660
    ('symbol', 'descendants')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   661
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   662
      ('symbol', 'max')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   663
      ('string', '$1')))
16096
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   664
  abort: unknown revision '$1'!
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   665
  [255]
b8be450638f6 revset: fix alias substitution recursion (issue3240)
Patrick Mezard <patrick@mezard.eu>
parents: 16008
diff changeset
   666
16771
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   667
  $ echo 'injectparamasstring2 = max(_aliasarg("$1"))' >> .hg/hgrc
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   668
  $ echo 'callinjection2($1) = descendants(injectparamasstring2)' >> .hg/hgrc
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   669
  $ try 'callinjection2(2:5)'
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   670
  (func
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   671
    ('symbol', 'callinjection2')
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   672
    (range
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   673
      ('symbol', '2')
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   674
      ('symbol', '5')))
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   675
  hg: parse error: not a function: _aliasarg
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   676
  [255]
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   677
  >>> data = file('.hg/hgrc', 'rb').read()
2f3317d53d51 revset: explicitely tag alias arguments for expansion
Patrick Mezard <patrick@mezard.eu>
parents: 16640
diff changeset
   678
  >>> 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
   679
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   680
  $ try 'd(2:5)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   681
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   682
    ('symbol', 'd')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   683
    (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   684
      ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   685
      ('symbol', '5')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   686
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   687
    ('symbol', 'reverse')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   688
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   689
      ('symbol', 'sort')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   690
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   691
        (range
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   692
          ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   693
          ('symbol', '5'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   694
        ('symbol', 'date'))))
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   695
  4
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   696
  5
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   697
  3
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   698
  2
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   699
  $ try 'rs(2 or 3, date)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   700
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   701
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   702
    (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   703
      (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   704
        ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   705
        ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   706
      ('symbol', 'date')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   707
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   708
    ('symbol', 'reverse')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   709
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   710
      ('symbol', 'sort')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   711
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   712
        (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   713
          ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   714
          ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   715
        ('symbol', 'date'))))
14098
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   716
  3
9f5a0acb0056 revset aliases
Alexander Solovyov <alexander@solovyov.net>
parents: 14080
diff changeset
   717
  2
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   718
  $ try 'rs()'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   719
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   720
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   721
    None)
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   722
  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
   723
  [255]
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   724
  $ try 'rs(2)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   725
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   726
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   727
    ('symbol', '2'))
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   728
  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
   729
  [255]
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   730
  $ try 'rs(2, data, 7)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   731
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   732
    ('symbol', 'rs')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   733
    (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   734
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   735
        ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   736
        ('symbol', 'data'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   737
      ('symbol', '7')))
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   738
  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
   739
  [255]
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   740
  $ try 'rs4(2 or 3, x, x, date)'
16218
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   741
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   742
    ('symbol', 'rs4')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   743
    (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   744
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   745
        (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   746
          (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   747
            ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   748
            ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   749
          ('symbol', 'x'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   750
        ('symbol', 'x'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   751
      ('symbol', 'date')))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   752
  (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   753
    ('symbol', 'reverse')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   754
    (func
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   755
      ('symbol', 'sort')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   756
      (list
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   757
        (or
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   758
          ('symbol', '2')
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   759
          ('symbol', '3'))
81a1a00f5738 debugrevspec: pretty print output
Patrick Mezard <patrick@mezard.eu>
parents: 16096
diff changeset
   760
        ('symbol', 'date'))))
14723
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   761
  3
b9faf94ee196 revset: fix aliases with 0 or more than 2 parameters
Mads Kiilerich <mads@kiilerich.com>
parents: 14650
diff changeset
   762
  2
14153
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
   763
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
   764
issue2549 - correct optimizations
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
   765
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
   766
  $ 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
   767
  1
f8047a059ca0 revset: avoid over-aggresive optimizations of non-filtering functions (issue2549)
Mads Kiilerich <mads@kiilerich.com>
parents: 14098
diff changeset
   768
  $ 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
   769
  $ 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
   770
  $ 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
   771
17858
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
   772
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
   773
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
   774
  $ 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
   775
  $ 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
   776
  9
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
   777
  $ 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
   778
  8
acd4577a568d test: add test for the issue introduced by e410be860393 (issue3669)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17753
diff changeset
   779
18473
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   780
test or-ed indirect predicates (issue3775)
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   781
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   782
  $ log '6 or 6^1' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   783
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   784
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   785
  $ log '6^1 or 6' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   786
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   787
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   788
  $ log '4 or 4~1' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   789
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   790
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   791
  $ log '4~1 or 4' | sort
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   792
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   793
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   794
  $ 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
   795
  0
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   796
  1
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   797
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   798
  3
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   799
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   800
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   801
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   802
  $ 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
   803
  0
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   804
  1
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   805
  2
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   806
  3
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   807
  4
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   808
  5
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   809
  6
692cbda1eb50 revset: evaluate sub expressions correctly (issue3775)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17858
diff changeset
   810
16008
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   811
tests for 'remote()' predicate:
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   812
#.  (csets in remote) (id)            (remote)
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   813
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
   814
2.  same with local   specified       "default"
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   815
3.  more than local   specified       specified
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   816
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   817
  $ hg clone --quiet -U . ../remote3
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   818
  $ cd ../remote3
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   819
  $ hg update -q 7
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   820
  $ echo r > r
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   821
  $ hg ci -Aqm 10
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   822
  $ log 'remote()'
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   823
  7
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   824
  $ log 'remote("a-b-c-")'
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   825
  2
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   826
  $ cd ../repo
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   827
  $ log 'remote(".a.b.c.", "../remote3")'
02a497a17257 revset: add tests for 'remote()' predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15726
diff changeset
   828
15726
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   829
  $ cd ..
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   830
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   831
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
   832
# unicode: cp932:
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   833
# 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
   834
# 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
   835
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   836
  $ 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
   837
  $ cd problematicencoding
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   838
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   839
  $ 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
   840
  > print u'''
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   841
  > 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
   842
  > 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
   843
  > 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
   844
  > 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
   845
  > 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
   846
  > 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
   847
  > 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
   848
  > 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
   849
  > 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
   850
  > '''.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
   851
  > EOF
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   852
  $ 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
   853
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   854
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
   855
  $ 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
   856
  > print u'''
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   857
  > 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
   858
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   859
  > 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
   860
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   861
  > 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
   862
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   863
  > 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
   864
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   865
  > 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
   866
  > echo ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   867
  > 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
   868
  > '''.encode('cp932')
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   869
  > EOF
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   870
  $ 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
   871
  0
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   872
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   873
  1
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   874
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   875
  2
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   876
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   877
  3
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   878
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   879
  0
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   880
  2
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   881
  ====
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   882
  1
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   883
  3
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   884
9b822edecb4c i18n: use "encoding.lower()" to normalize specified string for revset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15623
diff changeset
   885
  $ cd ..