tests/test-walk.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 13 Apr 2017 16:25:59 +0200
changeset 31982 fe83cb0dcafa
parent 31032 88358446da16
child 32491 2def402bd16d
permissions -rw-r--r--
obsolescence: add test for the "branch replacement" logic during push, case B3 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
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
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    32
  f  beans/black                     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    33
  f  beans/borlotti                  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    34
  f  beans/kidney                    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    35
  f  beans/navy                      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    36
  f  beans/pinto                     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    37
  f  beans/turtle                    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    38
  f  fennel                          fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    39
  f  fenugreek                       fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    40
  f  fiddlehead                      fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    41
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    42
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    43
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    44
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    45
  $ hg debugwalk -I.
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    46
  f  beans/black                     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    47
  f  beans/borlotti                  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    48
  f  beans/kidney                    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    49
  f  beans/navy                      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    50
  f  beans/pinto                     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    51
  f  beans/turtle                    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    52
  f  fennel                          fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    53
  f  fenugreek                       fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    54
  f  fiddlehead                      fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    55
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    56
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    57
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    58
  f  mammals/skunk                   mammals/skunk
889
0a06d9d373c3 Add unit tests for walk code.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    59
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    60
  $ cd mammals
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    61
  $ hg debugwalk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    62
  f  beans/black                     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    63
  f  beans/borlotti                  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    64
  f  beans/kidney                    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    65
  f  beans/navy                      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    66
  f  beans/pinto                     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    67
  f  beans/turtle                    ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    68
  f  fennel                          ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    69
  f  fenugreek                       ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    70
  f  fiddlehead                      ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    71
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    72
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    73
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    74
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    75
  $ hg debugwalk -X ../beans
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    76
  f  fennel                          ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    77
  f  fenugreek                       ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    78
  f  fiddlehead                      ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    79
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    80
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    81
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    82
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    83
  $ hg debugwalk -I '*k'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    84
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    85
  $ hg debugwalk -I 'glob:*k'
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 'relglob:*k'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    88
  f  beans/black    ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    89
  f  fenugreek      ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    90
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    91
  $ hg debugwalk -I 'relglob:*k' .
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 're:.*k$'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    94
  f  beans/black    ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    95
  f  fenugreek      ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    96
  f  mammals/skunk  skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    97
  $ hg debugwalk -I 'relre:.*k$'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    98
  f  beans/black    ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
    99
  f  fenugreek      ../fenugreek
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 'path:beans'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   102
  f  beans/black     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   103
  f  beans/borlotti  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   104
  f  beans/kidney    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   105
  f  beans/navy      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   106
  f  beans/pinto     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   107
  f  beans/turtle    ../beans/turtle
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   108
  $ hg debugwalk -I 'relpath:detour/../../beans'
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   109
  f  beans/black     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   110
  f  beans/borlotti  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   111
  f  beans/kidney    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   112
  f  beans/navy      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   113
  f  beans/pinto     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   114
  f  beans/turtle    ../beans/turtle
31032
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   115
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   116
  $ hg debugwalk 'rootfilesin:'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   117
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   118
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   119
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   120
  $ hg debugwalk -I 'rootfilesin:'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   121
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   122
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   123
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   124
  $ hg debugwalk 'rootfilesin:.'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   125
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   126
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   127
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   128
  $ hg debugwalk -I 'rootfilesin:.'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   129
  f  fennel      ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   130
  f  fenugreek   ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   131
  f  fiddlehead  ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   132
  $ hg debugwalk -X 'rootfilesin:'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   133
  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
   134
  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
   135
  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
   136
  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
   137
  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
   138
  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
   139
  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
   140
  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
   141
  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
   142
  f  mammals/skunk                   skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   143
  $ hg debugwalk 'rootfilesin:fennel'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   144
  $ hg debugwalk -I 'rootfilesin:fennel'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   145
  $ hg debugwalk 'rootfilesin:skunk'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   146
  $ hg debugwalk -I 'rootfilesin:skunk'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   147
  $ hg debugwalk 'rootfilesin:beans'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   148
  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
   149
  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
   150
  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
   151
  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
   152
  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
   153
  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
   154
  $ hg debugwalk -I 'rootfilesin:beans'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   155
  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
   156
  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
   157
  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
   158
  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
   159
  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
   160
  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
   161
  $ hg debugwalk 'rootfilesin:mammals'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   162
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   163
  $ hg debugwalk -I 'rootfilesin:mammals'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   164
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   165
  $ hg debugwalk 'rootfilesin:mammals/'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   166
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   167
  $ hg debugwalk -I 'rootfilesin:mammals/'
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   168
  f  mammals/skunk  skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   169
  $ hg debugwalk -X 'rootfilesin:mammals'
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
  f  fennel                          ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   177
  f  fenugreek                       ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   178
  f  fiddlehead                      ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
   179
  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
   180
  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
   181
  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
   182
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   183
  $ hg debugwalk .
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   184
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   185
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   186
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   187
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   188
  $ hg debugwalk -I.
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   189
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   190
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   191
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   192
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   193
  $ hg debugwalk Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   194
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   195
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   196
  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
   197
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   198
  $ cd Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   199
  $ hg debugwalk .
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   200
  f  mammals/Procyonidae/cacomistle  cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   201
  f  mammals/Procyonidae/coatimundi  coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   202
  f  mammals/Procyonidae/raccoon     raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   203
  $ hg debugwalk ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   204
  f  mammals/Procyonidae/cacomistle  cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   205
  f  mammals/Procyonidae/coatimundi  coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   206
  f  mammals/Procyonidae/raccoon     raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   207
  f  mammals/skunk                   ../skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   208
  $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   209
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   210
  $ hg debugwalk ../beans
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   211
  f  beans/black     ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   212
  f  beans/borlotti  ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   213
  f  beans/kidney    ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   214
  f  beans/navy      ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   215
  f  beans/pinto     ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   216
  f  beans/turtle    ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   217
  $ hg debugwalk .
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   218
  f  mammals/Procyonidae/cacomistle  Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   219
  f  mammals/Procyonidae/coatimundi  Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   220
  f  mammals/Procyonidae/raccoon     Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   221
  f  mammals/skunk                   skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   222
  $ hg debugwalk .hg
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   223
  abort: path 'mammals/.hg' is inside nested repo 'mammals' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   224
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   225
  $ hg debugwalk ../.hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
   226
  abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   227
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   228
  $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   229
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   230
  $ hg debugwalk -Ibeans
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   231
  f  beans/black     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   232
  f  beans/borlotti  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   233
  f  beans/kidney    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   234
  f  beans/navy      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   235
  f  beans/pinto     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   236
  f  beans/turtle    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   237
  $ hg debugwalk -I '{*,{b,m}*/*}k'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   238
  f  beans/black    beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   239
  f  fenugreek      fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   240
  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
   241
  $ hg debugwalk -Ibeans mammals
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   242
  $ hg debugwalk -Inon-existent
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   243
  $ hg debugwalk -Inon-existent -Ibeans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   244
  f  beans/black  beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   245
  $ hg debugwalk -Ibeans beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   246
  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
   247
  $ hg debugwalk -Ibeans/black beans
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   248
  f  beans/black  beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   249
  $ hg debugwalk -Xbeans/black beans
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   250
  f  beans/borlotti  beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   251
  f  beans/kidney    beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   252
  f  beans/navy      beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   253
  f  beans/pinto     beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   254
  f  beans/turtle    beans/turtle
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   255
  $ hg debugwalk -Xbeans/black -Ibeans
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   256
  f  beans/borlotti  beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   257
  f  beans/kidney    beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   258
  f  beans/navy      beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   259
  f  beans/pinto     beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   260
  f  beans/turtle    beans/turtle
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   261
  $ hg debugwalk -Xbeans/black beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   262
  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
   263
  $ hg debugwalk -Xbeans/black -Ibeans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   264
  $ hg debugwalk -Xbeans beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
   265
  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
   266
  $ hg debugwalk -Xbeans -Ibeans/black
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   267
  $ hg debugwalk 'glob:mammals/../beans/b*'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   268
  f  beans/black     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   269
  f  beans/borlotti  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   270
  $ hg debugwalk '-X*/Procyonidae' mammals
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   271
  f  mammals/skunk  mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   272
  $ hg debugwalk path:mammals
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   273
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   274
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   275
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   276
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   277
  $ hg debugwalk ..
18506
ef60083b5536 tests: fix for windows - slashes and no serve
Mads Kiilerich <madski@unity3d.com>
parents: 18450
diff changeset
   278
  abort: .. not under root '$TESTTMP/t' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   279
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   280
  $ hg debugwalk beans/../..
18506
ef60083b5536 tests: fix for windows - slashes and no serve
Mads Kiilerich <madski@unity3d.com>
parents: 18450
diff changeset
   281
  abort: beans/../.. not under root '$TESTTMP/t' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   282
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   283
  $ hg debugwalk .hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
   284
  abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   285
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   286
  $ 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
   287
  abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   288
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   289
  $ hg debugwalk beans/../.hg/data
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   290
  abort: path contains illegal component: .hg/data (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   291
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   292
  $ hg debugwalk beans/.hg
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   293
  abort: path 'beans/.hg' is inside nested repo 'beans' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   294
  [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   295
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   296
Test absolute paths:
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   297
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   298
  $ hg debugwalk `pwd`/beans
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   299
  f  beans/black     beans/black
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   300
  f  beans/borlotti  beans/borlotti
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   301
  f  beans/kidney    beans/kidney
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   302
  f  beans/navy      beans/navy
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   303
  f  beans/pinto     beans/pinto
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   304
  f  beans/turtle    beans/turtle
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   305
  $ hg debugwalk `pwd`/..
18506
ef60083b5536 tests: fix for windows - slashes and no serve
Mads Kiilerich <madski@unity3d.com>
parents: 18450
diff changeset
   306
  abort: $TESTTMP/t/.. not under root '$TESTTMP/t' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   307
  [255]
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   308
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   309
Test patterns:
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
   310
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   311
  $ hg debugwalk glob:\*
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   312
  f  fennel      fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   313
  f  fenugreek   fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   314
  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
   315
#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
   316
  $ 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
   317
  $ 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
   318
  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
   319
  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
   320
  $ hg debugwalk glob:\*
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
   321
  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
   322
  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
   323
  f  fiddlehead  fiddlehead
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   324
  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
   325
  $ hg debugwalk glob:glob
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   326
  glob: No such file or directory
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   327
  $ hg debugwalk glob:glob:glob
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   328
  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
   329
  $ hg debugwalk path:glob:glob
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
   330
  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
   331
  $ 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
   332
  $ 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
   333
  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
   334
#endif
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   335
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   336
  $ hg debugwalk 'glob:**e'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   337
  f  beans/turtle                    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   338
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   339
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   340
  $ hg debugwalk 're:.*[kb]$'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   341
  f  beans/black    beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   342
  f  fenugreek      fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   343
  f  mammals/skunk  mammals/skunk
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   344
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   345
  $ hg debugwalk path:beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   346
  f  beans/black  beans/black  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   347
  $ hg debugwalk path:beans//black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   348
  f  beans/black  beans/black  exact
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
   349
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   350
  $ hg debugwalk relglob:Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   351
  $ hg debugwalk 'relglob:Procyonidae/**'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   352
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   353
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   354
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   355
  $ hg debugwalk 'relglob:Procyonidae/**' fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   356
  f  fennel                          fennel                          exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   357
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   358
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   359
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   360
  $ hg debugwalk beans 'glob:beans/*'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   361
  f  beans/black     beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   362
  f  beans/borlotti  beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   363
  f  beans/kidney    beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   364
  f  beans/navy      beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   365
  f  beans/pinto     beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   366
  f  beans/turtle    beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   367
  $ hg debugwalk 'glob:mamm**'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   368
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   369
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   370
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   371
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   372
  $ hg debugwalk 'glob:mamm**' fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   373
  f  fennel                          fennel                          exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   374
  f  mammals/Procyonidae/cacomistle  mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   375
  f  mammals/Procyonidae/coatimundi  mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   376
  f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   377
  f  mammals/skunk                   mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   378
  $ hg debugwalk 'glob:j*'
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   379
  $ hg debugwalk NOEXIST
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 15444
diff changeset
   380
  NOEXIST: * (glob)
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
   381
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   382
#if fifo
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   383
  $ mkfifo fifo
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   384
  $ hg debugwalk fifo
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   385
  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
   386
#endif
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   387
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   388
  $ rm fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   389
  $ hg debugwalk fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   390
  f  fenugreek  fenugreek  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   391
  $ hg rm fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   392
  $ hg debugwalk fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   393
  f  fenugreek  fenugreek  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   394
  $ touch new
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   395
  $ hg debugwalk new
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   396
  f  new  new  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   397
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   398
  $ mkdir ignored
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   399
  $ touch ignored/file
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   400
  $ echo '^ignored$' > .hgignore
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   401
  $ hg debugwalk ignored
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   402
  $ hg debugwalk ignored/file
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   403
  f  ignored/file  ignored/file  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   404
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   405
Test listfile and listfile0
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   406
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 21191
diff changeset
   407
  $ $PYTHON -c "file('listfile0', 'wb').write('fenugreek\0new\0')"
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   408
  $ hg debugwalk -I 'listfile0:listfile0'
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   409
  f  fenugreek  fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   410
  f  new        new
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 21191
diff changeset
   411
  $ $PYTHON -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
   412
  $ hg debugwalk -I 'listfile:listfile'
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   413
  f  fenugreek      fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   414
  f  mammals/skunk  mammals/skunk
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   415
  f  new            new
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
   416
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   417
  $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   418
  $ hg debugwalk -R t t/mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   419
  f  mammals/skunk  t/mammals/skunk  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   420
  $ mkdir t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   421
  $ cd t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   422
  $ hg debugwalk -R ../t ../t/mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   423
  f  mammals/skunk  ../t/mammals/skunk  exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   424
  $ hg debugwalk --cwd ../t mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
   425
  f  mammals/skunk  mammals/skunk  exact
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
   426
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
   427
  $ cd ..
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   428
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   429
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
   430
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   431
  $ cd t
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   432
  $ echo fennel > overflow.list
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 21191
diff changeset
   433
  $ $PYTHON -c "for i in xrange(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
   434
  $ echo fenugreek >> overflow.list
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   435
  $ hg debugwalk 'listfile:overflow.list' 2>&1 | grep -v '^xxx'
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   436
  f  fennel     fennel     exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   437
  f  fenugreek  fenugreek  exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
   438
  $ cd ..