tests/test-walk.t
author Augie Fackler <augie@google.com>
Fri, 02 Mar 2018 11:06:37 -0500
changeset 36601 4da09b46451e
parent 36288 217b08b1de28
child 37317 14da486e820d
permissions -rw-r--r--
lfs: add some bytestring wrappers in blobstore.py Differential Revision: https://phab.mercurial-scm.org/D2565
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13910
diff changeset
     1
  $ hg init t
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     2
  $ cd t
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     3
  $ mkdir -p beans
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     4
  $ for b in kidney navy turtle borlotti black pinto; do
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     5
  >     echo $b > beans/$b
19873
b3de50b0c7aa check-code: check that '>' is used for continued lines
Mads Kiilerich <madski@unity3d.com>
parents: 18682
diff changeset
     6
  > done
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     7
  $ mkdir -p mammals/Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     8
  $ for m in cacomistle coatimundi raccoon; do
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
     9
  >     echo $m > mammals/Procyonidae/$m
19873
b3de50b0c7aa check-code: check that '>' is used for continued lines
Mads Kiilerich <madski@unity3d.com>
parents: 18682
diff changeset
    10
  > done
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    11
  $ echo skunk > mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    12
  $ echo fennel > fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    13
  $ echo fenugreek > fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    14
  $ echo fiddlehead > fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    15
  $ hg addremove
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    16
  adding beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    17
  adding beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    18
  adding beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    19
  adding beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    20
  adding beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    21
  adding beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    22
  adding fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    23
  adding fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    24
  adding fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    25
  adding mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    26
  adding mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    27
  adding mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    28
  adding mammals/skunk
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11903
diff changeset
    29
  $ hg commit -m "commit #0"
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    30
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    31
  $ hg debugwalk
32553
20c9f3ecc192 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32504
diff changeset
    32
  matcher: <alwaysmatcher>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    33
  f  beans/black                     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    34
  f  beans/borlotti                  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    35
  f  beans/kidney                    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    36
  f  beans/navy                      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    37
  f  beans/pinto                     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    38
  f  beans/turtle                    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    39
  f  fennel                          fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    40
  f  fenugreek                       fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    41
  f  fiddlehead                      fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    42
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    43
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    44
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    45
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    46
  $ hg debugwalk -I.
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
    47
  matcher: <includematcher includes='(?:)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    48
  f  beans/black                     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    49
  f  beans/borlotti                  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    50
  f  beans/kidney                    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    51
  f  beans/navy                      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    52
  f  beans/pinto                     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    53
  f  beans/turtle                    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    54
  f  fennel                          fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    55
  f  fenugreek                       fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    56
  f  fiddlehead                      fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    57
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    58
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    59
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    60
  f  mammals/skunk                   mammals/skunk
889
0a06d9d373c3 Add unit tests for walk code.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    61
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    62
  $ cd mammals
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    63
  $ hg debugwalk
32553
20c9f3ecc192 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32504
diff changeset
    64
  matcher: <alwaysmatcher>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    65
  f  beans/black                     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    66
  f  beans/borlotti                  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    67
  f  beans/kidney                    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    68
  f  beans/navy                      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    69
  f  beans/pinto                     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    70
  f  beans/turtle                    ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    71
  f  fennel                          ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    72
  f  fenugreek                       ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    73
  f  fiddlehead                      ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    74
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    75
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    76
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    77
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    78
  $ hg debugwalk -X ../beans
32553
20c9f3ecc192 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32504
diff changeset
    79
  matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:beans(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    80
  f  fennel                          ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    81
  f  fenugreek                       ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    82
  f  fiddlehead                      ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    83
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    84
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    85
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    86
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    87
  $ hg debugwalk -I '*k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
    88
  matcher: <includematcher includes='(?:mammals\\/[^/]*k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    89
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    90
  $ hg debugwalk -I 'glob:*k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
    91
  matcher: <includematcher includes='(?:mammals\\/[^/]*k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    92
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    93
  $ hg debugwalk -I 'relglob:*k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
    94
  matcher: <includematcher includes='(?:(?:|.*/)[^/]*k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    95
  f  beans/black    ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    96
  f  fenugreek      ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    97
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    98
  $ hg debugwalk -I 'relglob:*k' .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
    99
  matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:(?:|.*/)[^/]*k(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   100
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   101
  $ hg debugwalk -I 're:.*k$'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   102
  matcher: <includematcher includes='(?:.*k$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   103
  f  beans/black    ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   104
  f  fenugreek      ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   105
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   106
  $ hg debugwalk -I 'relre:.*k$'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   107
  matcher: <includematcher includes='(?:.*.*k$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   108
  f  beans/black    ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   109
  f  fenugreek      ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   110
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   111
  $ hg debugwalk -I 'path:beans'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   112
  matcher: <includematcher includes='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   113
  f  beans/black     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   114
  f  beans/borlotti  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   115
  f  beans/kidney    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   116
  f  beans/navy      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   117
  f  beans/pinto     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   118
  f  beans/turtle    ../beans/turtle
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   119
  $ hg debugwalk -I 'relpath:detour/../../beans'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   120
  matcher: <includematcher includes='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   121
  f  beans/black     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   122
  f  beans/borlotti  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   123
  f  beans/kidney    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   124
  f  beans/navy      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   125
  f  beans/pinto     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   126
  f  beans/turtle    ../beans/turtle
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   127
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   128
  $ hg debugwalk 'rootfilesin:'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   129
  matcher: <patternmatcher patterns='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   130
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   131
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   132
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   133
  $ hg debugwalk -I 'rootfilesin:'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   134
  matcher: <includematcher includes='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   135
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   136
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   137
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   138
  $ hg debugwalk 'rootfilesin:.'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   139
  matcher: <patternmatcher patterns='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   140
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   141
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   142
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   143
  $ hg debugwalk -I 'rootfilesin:.'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   144
  matcher: <includematcher includes='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   145
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   146
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   147
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   148
  $ hg debugwalk -X 'rootfilesin:'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   149
  matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:[^/]+$)'>>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   150
  f  beans/black                     ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   151
  f  beans/borlotti                  ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   152
  f  beans/kidney                    ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   153
  f  beans/navy                      ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   154
  f  beans/pinto                     ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   155
  f  beans/turtle                    ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   156
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   157
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   158
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   159
  f  mammals/skunk                   skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   160
  $ hg debugwalk 'rootfilesin:fennel'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   161
  matcher: <patternmatcher patterns='(?:fennel/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   162
  $ hg debugwalk -I 'rootfilesin:fennel'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   163
  matcher: <includematcher includes='(?:fennel/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   164
  $ hg debugwalk 'rootfilesin:skunk'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   165
  matcher: <patternmatcher patterns='(?:skunk/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   166
  $ hg debugwalk -I 'rootfilesin:skunk'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   167
  matcher: <includematcher includes='(?:skunk/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   168
  $ hg debugwalk 'rootfilesin:beans'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   169
  matcher: <patternmatcher patterns='(?:beans/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   170
  f  beans/black     ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   171
  f  beans/borlotti  ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   172
  f  beans/kidney    ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   173
  f  beans/navy      ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   174
  f  beans/pinto     ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   175
  f  beans/turtle    ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   176
  $ hg debugwalk -I 'rootfilesin:beans'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   177
  matcher: <includematcher includes='(?:beans/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   178
  f  beans/black     ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   179
  f  beans/borlotti  ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   180
  f  beans/kidney    ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   181
  f  beans/navy      ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   182
  f  beans/pinto     ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   183
  f  beans/turtle    ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   184
  $ hg debugwalk 'rootfilesin:mammals'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   185
  matcher: <patternmatcher patterns='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   186
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   187
  $ hg debugwalk -I 'rootfilesin:mammals'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   188
  matcher: <includematcher includes='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   189
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   190
  $ hg debugwalk 'rootfilesin:mammals/'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   191
  matcher: <patternmatcher patterns='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   192
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   193
  $ hg debugwalk -I 'rootfilesin:mammals/'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   194
  matcher: <includematcher includes='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   195
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   196
  $ hg debugwalk -X 'rootfilesin:mammals'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   197
  matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:mammals/[^/]+$)'>>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   198
  f  beans/black                     ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   199
  f  beans/borlotti                  ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   200
  f  beans/kidney                    ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   201
  f  beans/navy                      ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   202
  f  beans/pinto                     ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   203
  f  beans/turtle                    ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   204
  f  fennel                          ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   205
  f  fenugreek                       ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   206
  f  fiddlehead                      ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   207
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   208
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   209
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   210
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   211
  $ hg debugwalk .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   212
  matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   213
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   214
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   215
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   216
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   217
  $ hg debugwalk -I.
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   218
  matcher: <includematcher includes='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   219
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   220
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   221
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   222
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   223
  $ hg debugwalk Procyonidae
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   224
  matcher: <patternmatcher patterns='(?:mammals\\/Procyonidae(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   225
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   226
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   227
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
4191
02de0f98ca33 make the output of test-walk more readable
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4190
diff changeset
   228
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   229
  $ cd Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   230
  $ hg debugwalk .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   231
  matcher: <patternmatcher patterns='(?:mammals\\/Procyonidae(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   232
  f  mammals/Procyonidae/cacomistle  cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   233
  f  mammals/Procyonidae/coatimundi  coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   234
  f  mammals/Procyonidae/raccoon     raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   235
  $ hg debugwalk ..
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   236
  matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   237
  f  mammals/Procyonidae/cacomistle  cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   238
  f  mammals/Procyonidae/coatimundi  coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   239
  f  mammals/Procyonidae/raccoon     raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   240
  f  mammals/skunk                   ../skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   241
  $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   242
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   243
  $ hg debugwalk ../beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   244
  matcher: <patternmatcher patterns='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   245
  f  beans/black     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   246
  f  beans/borlotti  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   247
  f  beans/kidney    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   248
  f  beans/navy      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   249
  f  beans/pinto     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   250
  f  beans/turtle    ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   251
  $ hg debugwalk .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   252
  matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   253
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   254
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   255
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   256
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   257
  $ hg debugwalk .hg
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   258
  abort: path 'mammals/.hg' is inside nested repo 'mammals'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   259
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   260
  $ hg debugwalk ../.hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
   261
  abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   262
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   263
  $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   264
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   265
  $ hg debugwalk -Ibeans
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   266
  matcher: <includematcher includes='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   267
  f  beans/black     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   268
  f  beans/borlotti  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   269
  f  beans/kidney    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   270
  f  beans/navy      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   271
  f  beans/pinto     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   272
  f  beans/turtle    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   273
  $ hg debugwalk -I '{*,{b,m}*/*}k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   274
  matcher: <includematcher includes='(?:(?:[^/]*|(?:b|m)[^/]*\\/[^/]*)k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   275
  f  beans/black    beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   276
  f  fenugreek      fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   277
  f  mammals/skunk  mammals/skunk
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   278
  $ hg debugwalk -Ibeans mammals
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   279
  matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   280
  $ hg debugwalk -Inon-existent
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   281
  matcher: <includematcher includes='(?:non\\-existent(?:/|$))'>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   282
  $ hg debugwalk -Inon-existent -Ibeans/black
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   283
  matcher: <includematcher includes='(?:non\\-existent(?:/|$)|beans\\/black(?:/|$))'>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   284
  f  beans/black  beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   285
  $ hg debugwalk -Ibeans beans/black
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   286
  matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   287
  f  beans/black  beans/black  exact
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   288
  $ hg debugwalk -Ibeans/black beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   289
  matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:beans(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   290
  f  beans/black  beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   291
  $ hg debugwalk -Xbeans/black beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   292
  matcher: <differencematcher m1=<patternmatcher patterns='(?:beans(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   293
  f  beans/borlotti  beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   294
  f  beans/kidney    beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   295
  f  beans/navy      beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   296
  f  beans/pinto     beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   297
  f  beans/turtle    beans/turtle
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   298
  $ hg debugwalk -Xbeans/black -Ibeans
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   299
  matcher: <differencematcher m1=<includematcher includes='(?:beans(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   300
  f  beans/borlotti  beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   301
  f  beans/kidney    beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   302
  f  beans/navy      beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   303
  f  beans/pinto     beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   304
  f  beans/turtle    beans/turtle
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   305
  $ hg debugwalk -Xbeans/black beans/black
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   306
  matcher: <differencematcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   307
  $ hg debugwalk -Xbeans/black -Ibeans/black
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   308
  matcher: <differencematcher m1=<includematcher includes='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   309
  $ hg debugwalk -Xbeans beans/black
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   310
  matcher: <differencematcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   311
  $ hg debugwalk -Xbeans -Ibeans/black
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   312
  matcher: <differencematcher m1=<includematcher includes='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   313
  $ hg debugwalk 'glob:mammals/../beans/b*'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   314
  matcher: <patternmatcher patterns='(?:beans\\/b[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   315
  f  beans/black     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   316
  f  beans/borlotti  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   317
  $ hg debugwalk '-X*/Procyonidae' mammals
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   318
  matcher: <differencematcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:[^/]*\\/Procyonidae(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   319
  f  mammals/skunk  mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   320
  $ hg debugwalk path:mammals
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   321
  matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   322
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   323
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   324
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   325
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   326
  $ hg debugwalk ..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   327
  abort: .. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   328
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   329
  $ hg debugwalk beans/../..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   330
  abort: beans/../.. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   331
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   332
  $ hg debugwalk .hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
   333
  abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   334
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   335
  $ hg debugwalk beans/../.hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
   336
  abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   337
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   338
  $ hg debugwalk beans/../.hg/data
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   339
  abort: path contains illegal component: .hg/data
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   340
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   341
  $ hg debugwalk beans/.hg
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   342
  abort: path 'beans/.hg' is inside nested repo 'beans'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   343
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   344
35659
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   345
Test explicit paths and excludes:
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   346
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   347
  $ hg debugwalk fennel -X fennel
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   348
  matcher: <differencematcher m1=<patternmatcher patterns='(?:fennel(?:/|$))'>, m2=<includematcher includes='(?:fennel(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   349
  $ hg debugwalk fennel -X 'f*'
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   350
  matcher: <differencematcher m1=<patternmatcher patterns='(?:fennel(?:/|$))'>, m2=<includematcher includes='(?:f[^/]*(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   351
  $ hg debugwalk beans/black -X 'path:beans'
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   352
  matcher: <differencematcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   353
  $ hg debugwalk -I 'path:beans/black' -X 'path:beans'
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   354
  matcher: <differencematcher m1=<includematcher includes='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
   355
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   356
Test absolute paths:
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   357
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   358
  $ hg debugwalk `pwd`/beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   359
  matcher: <patternmatcher patterns='(?:beans(?:/|$))'>
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   360
  f  beans/black     beans/black
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   361
  f  beans/borlotti  beans/borlotti
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   362
  f  beans/kidney    beans/kidney
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   363
  f  beans/navy      beans/navy
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   364
  f  beans/pinto     beans/pinto
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   365
  f  beans/turtle    beans/turtle
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   366
  $ hg debugwalk `pwd`/..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   367
  abort: $TESTTMP/t/.. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   368
  [255]
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   369
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   370
Test patterns:
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
   371
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   372
  $ hg debugwalk glob:\*
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   373
  matcher: <patternmatcher patterns='(?:[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   374
  f  fennel      fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   375
  f  fenugreek   fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   376
  f  fiddlehead  fiddlehead
16983
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   377
#if eol-in-paths
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   378
  $ echo glob:glob > glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   379
  $ hg addremove
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   380
  adding glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   381
  warning: filename contains ':', which is reserved on Windows: 'glob:glob'
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   382
  $ hg debugwalk glob:\*
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   383
  matcher: <patternmatcher patterns='(?:[^/]*$)'>
16983
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   384
  f  fennel      fennel
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   385
  f  fenugreek   fenugreek
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   386
  f  fiddlehead  fiddlehead
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   387
  f  glob:glob   glob:glob
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   388
  $ hg debugwalk glob:glob
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   389
  matcher: <patternmatcher patterns='(?:glob$)'>
35230
feecfefeba25 tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 33357
diff changeset
   390
  glob: $ENOENT$
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   391
  $ hg debugwalk glob:glob:glob
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   392
  matcher: <patternmatcher patterns='(?:glob\\:glob$)'>
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   393
  f  glob:glob  glob:glob  exact
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   394
  $ hg debugwalk path:glob:glob
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   395
  matcher: <patternmatcher patterns='(?:glob\\:glob(?:/|$))'>
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   396
  f  glob:glob  glob:glob  exact
16983
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   397
  $ rm glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   398
  $ hg addremove
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   399
  removing glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   400
#endif
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   401
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   402
  $ hg debugwalk 'glob:**e'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   403
  matcher: <patternmatcher patterns='(?:.*e$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   404
  f  beans/turtle                    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   405
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   406
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   407
  $ hg debugwalk 're:.*[kb]$'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   408
  matcher: <patternmatcher patterns='(?:.*[kb]$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   409
  f  beans/black    beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   410
  f  fenugreek      fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   411
  f  mammals/skunk  mammals/skunk
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   412
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   413
  $ hg debugwalk path:beans/black
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   414
  matcher: <patternmatcher patterns='(?:beans\\/black(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   415
  f  beans/black  beans/black  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   416
  $ hg debugwalk path:beans//black
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
   417
  matcher: <patternmatcher patterns='(?:beans\\/black(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   418
  f  beans/black  beans/black  exact
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   419
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   420
  $ hg debugwalk relglob:Procyonidae
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   421
  matcher: <patternmatcher patterns='(?:(?:|.*/)Procyonidae$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   422
  $ hg debugwalk 'relglob:Procyonidae/**'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   423
  matcher: <patternmatcher patterns='(?:(?:|.*/)Procyonidae\\/.*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   424
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   425
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   426
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   427
  $ hg debugwalk 'relglob:Procyonidae/**' fennel
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   428
  matcher: <patternmatcher patterns='(?:(?:|.*/)Procyonidae\\/.*$|fennel(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   429
  f  fennel                          fennel                          exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   430
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   431
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   432
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   433
  $ hg debugwalk beans 'glob:beans/*'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   434
  matcher: <patternmatcher patterns='(?:beans(?:/|$)|beans\\/[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   435
  f  beans/black     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   436
  f  beans/borlotti  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   437
  f  beans/kidney    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   438
  f  beans/navy      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   439
  f  beans/pinto     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   440
  f  beans/turtle    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   441
  $ hg debugwalk 'glob:mamm**'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   442
  matcher: <patternmatcher patterns='(?:mamm.*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   443
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   444
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   445
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   446
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   447
  $ hg debugwalk 'glob:mamm**' fennel
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   448
  matcher: <patternmatcher patterns='(?:mamm.*$|fennel(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   449
  f  fennel                          fennel                          exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   450
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   451
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   452
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   453
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   454
  $ hg debugwalk 'glob:j*'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   455
  matcher: <patternmatcher patterns='(?:j[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   456
  $ hg debugwalk NOEXIST
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   457
  matcher: <patternmatcher patterns='(?:NOEXIST(?:/|$))'>
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 15444
diff changeset
   458
  NOEXIST: * (glob)
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
   459
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   460
#if fifo
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   461
  $ mkfifo fifo
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   462
  $ hg debugwalk fifo
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   463
  matcher: <patternmatcher patterns='(?:fifo(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   464
  fifo: unsupported file type (type is fifo)
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   465
#endif
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   466
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   467
  $ rm fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   468
  $ hg debugwalk fenugreek
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   469
  matcher: <patternmatcher patterns='(?:fenugreek(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   470
  f  fenugreek  fenugreek  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   471
  $ hg rm fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   472
  $ hg debugwalk fenugreek
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   473
  matcher: <patternmatcher patterns='(?:fenugreek(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   474
  f  fenugreek  fenugreek  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   475
  $ touch new
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   476
  $ hg debugwalk new
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   477
  matcher: <patternmatcher patterns='(?:new(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   478
  f  new  new  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   479
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   480
  $ mkdir ignored
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   481
  $ touch ignored/file
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   482
  $ echo '^ignored$' > .hgignore
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   483
  $ hg debugwalk ignored
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   484
  matcher: <patternmatcher patterns='(?:ignored(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   485
  $ hg debugwalk ignored/file
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   486
  matcher: <patternmatcher patterns='(?:ignored\\/file(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   487
  f  ignored/file  ignored/file  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   488
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   489
Test listfile and listfile0
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   490
36015
3790d735ff68 py3: replace file() with open() in test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35659
diff changeset
   491
  $ $PYTHON -c "open('listfile0', 'wb').write(b'fenugreek\0new\0')"
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   492
  $ hg debugwalk -I 'listfile0:listfile0'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   493
  matcher: <includematcher includes='(?:fenugreek(?:/|$)|new(?:/|$))'>
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   494
  f  fenugreek  fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   495
  f  new        new
36015
3790d735ff68 py3: replace file() with open() in test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35659
diff changeset
   496
  $ $PYTHON -c "open('listfile', 'wb').write(b'fenugreek\nnew\r\nmammals/skunk\n')"
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   497
  $ hg debugwalk -I 'listfile:listfile'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
   498
  matcher: <includematcher includes='(?:fenugreek(?:/|$)|new(?:/|$)|mammals\\/skunk(?:/|$))'>
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   499
  f  fenugreek      fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   500
  f  mammals/skunk  mammals/skunk
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   501
  f  new            new
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   502
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   503
  $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   504
  $ hg debugwalk -R t t/mammals/skunk
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   505
  matcher: <patternmatcher patterns='(?:mammals\\/skunk(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   506
  f  mammals/skunk  t/mammals/skunk  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   507
  $ mkdir t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   508
  $ cd t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   509
  $ hg debugwalk -R ../t ../t/mammals/skunk
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   510
  matcher: <patternmatcher patterns='(?:mammals\\/skunk(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   511
  f  mammals/skunk  ../t/mammals/skunk  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   512
  $ hg debugwalk --cwd ../t mammals/skunk
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
   513
  matcher: <patternmatcher patterns='(?:mammals\\/skunk(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   514
  f  mammals/skunk  mammals/skunk  exact
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
   515
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
   516
  $ cd ..
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   517
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   518
Test split patterns on overflow
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   519
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   520
  $ cd t
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   521
  $ echo fennel > overflow.list
36288
217b08b1de28 py3: use range instead of xrange in tests/test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36200
diff changeset
   522
  $ $PYTHON -c "for i in range(20000 / 100): print 'x' * 100" >> overflow.list
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   523
  $ echo fenugreek >> overflow.list
32457
2def402bd16d debugwalk: also print matcher representation
Martin von Zweigbergk <martinvonz@google.com>
parents: 31012
diff changeset
   524
  $ hg debugwalk 'listfile:overflow.list' 2>&1 | egrep -v '(^matcher: |^xxx)'
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   525
  f  fennel     fennel     exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   526
  f  fenugreek  fenugreek  exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   527
  $ cd ..