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