tests/test-hgignore.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 16 Nov 2022 13:05:01 +0100
branchstable
changeset 49603 3eda36e9b3d6
parent 49558 363923bd51cd
child 49604 086b0c4f8663
permissions -rw-r--r--
matcher: fix issues regex flag contained in pattern (issue6759) Python 3.11 is now enforcing that flag must be at the beginning of the regex This creates a serious regression for people using Python 3.11 with an hgignore using flag in a "relre" pattern. We now detect any flags in such pattern and "prepend" our ".*" pattern after them. In addition, we now insert the flag in the regexp to only affect the pattern we are rewriting. Otherwise, the regex built from the combined pattern would these flags in the middle of it anyway. As a side effect of this last change, we fix a bug… before this change regex flag in a pattern would affect all combined patterns. That was bad and is not longer the case. The Rust code needs to be updated to fix that very bug, but we will do it in another changeset.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48068
bf8837e3d7ce dirstate: Remove the flat Rust DirstateMap implementation
Simon Sapin <simon.sapin@octobus.net>
parents: 47674
diff changeset
     1
#testcases dirstate-v1 dirstate-v2
47129
93eb6c8035a9 dirstate-tree: Add a dirstate-v1-tree variant of some tests
Simon Sapin <simon.sapin@octobus.net>
parents: 42864
diff changeset
     2
47281
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
     3
#if dirstate-v2
48235
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
     4
  $ cat >> $HGRCPATH << EOF
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
     5
  > [format]
48674
f7086f6173f8 dirstate-v2: rename the configuration to enable the format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48295
diff changeset
     6
  > use-dirstate-v2=1
48235
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
     7
  > [storage]
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
     8
  > dirstate-v2.slow-path=allow
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
     9
  > EOF
47281
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
    10
#endif
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
    11
25869
a72e304df528 test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents: 25283
diff changeset
    12
  $ hg init ignorerepo
a72e304df528 test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents: 25283
diff changeset
    13
  $ cd ignorerepo
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
32605
e6ff007e107e match: introduce nevermatcher for when no ignore files are present
Siddharth Agarwal <sid0@fb.com>
parents: 32502
diff changeset
    15
debugignore with no hgignore should be deterministic:
e6ff007e107e match: introduce nevermatcher for when no ignore files are present
Siddharth Agarwal <sid0@fb.com>
parents: 32502
diff changeset
    16
  $ hg debugignore
e6ff007e107e match: introduce nevermatcher for when no ignore files are present
Siddharth Agarwal <sid0@fb.com>
parents: 32502
diff changeset
    17
  <nevermatcher>
e6ff007e107e match: introduce nevermatcher for when no ignore files are present
Siddharth Agarwal <sid0@fb.com>
parents: 32502
diff changeset
    18
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
    19
Issue562: .hgignore requires newline at end:
4439
4e521a3ee5eb Test issue 562: .hgignore requires newline at end
Patrick Mezard <pmezard@gmail.com>
parents: 2009
diff changeset
    20
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    21
  $ touch foo
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    22
  $ touch bar
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    23
  $ touch baz
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    24
  $ cat > makeignore.py <<EOF
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    25
  > f = open(".hgignore", "w")
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    26
  > f.write("ignore\n")
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    27
  > f.write("foo\n")
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    28
  > # No EOL here
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    29
  > f.write("bar")
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    30
  > f.close()
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    31
  > EOF
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    32
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
    33
  $ "$PYTHON" makeignore.py
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    34
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    35
Should display baz only:
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    36
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    37
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    38
  ? baz
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    39
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    40
  $ rm foo bar baz .hgignore makeignore.py
4439
4e521a3ee5eb Test issue 562: .hgignore requires newline at end
Patrick Mezard <pmezard@gmail.com>
parents: 2009
diff changeset
    41
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    42
  $ touch a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    43
  $ touch a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    44
  $ touch syntax
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    45
  $ mkdir dir
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    46
  $ touch dir/a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    47
  $ touch dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    48
  $ touch dir/c.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    49
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    50
  $ hg add dir/a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    51
  $ hg commit -m 0
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    52
  $ hg add dir/b.o
4439
4e521a3ee5eb Test issue 562: .hgignore requires newline at end
Patrick Mezard <pmezard@gmail.com>
parents: 2009
diff changeset
    53
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    54
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    55
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    56
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    57
  ? a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    58
  ? dir/c.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    59
  ? syntax
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    60
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
    61
  $ echo "*.o" > .hgignore
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12312
diff changeset
    62
  $ hg status
25869
a72e304df528 test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents: 25283
diff changeset
    63
  abort: $TESTTMP/ignorerepo/.hgignore: invalid pattern (relre): *.o (glob)
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12312
diff changeset
    64
  [255]
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    65
49603
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    66
Test relre with flags (issue6759)
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    67
---------------------------------
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    68
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    69
regexp with flag is the first one
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    70
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    71
  $ echo 're:(?i)\.O$' > .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    72
  $ echo 're:.hgignore' >> .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    73
  $ hg status
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    74
  A dir/b.o
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    75
  ? a.c
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    76
  ? syntax
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    77
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    78
regex with flag is not the first one
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    79
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    80
  $ echo 're:.hgignore' > .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    81
  $ echo 're:(?i)\.O$' >> .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    82
  $ hg status
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    83
  A dir/b.o
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    84
  ? a.c
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    85
  ? syntax
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    86
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    87
flag in a pattern should affect that pattern only
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    88
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    89
  $ echo 're:(?i)\.O$' > .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    90
  $ echo 're:.HGIGNORE' >> .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    91
  $ hg status
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    92
  A dir/b.o
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    93
  ? .hgignore (no-rust !)
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    94
  ? .hgignore (rust missing-correct-output !)
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    95
  ? a.c
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    96
  ? syntax
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    97
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    98
  $ echo 're:.HGIGNORE' > .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
    99
  $ echo 're:(?i)\.O$' >> .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   100
  $ hg status
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   101
  A dir/b.o
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   102
  ? .hgignore
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   103
  ? a.c
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   104
  ? syntax
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   105
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   106
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   107
further testing
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   108
---------------
3eda36e9b3d6 matcher: fix issues regex flag contained in pattern (issue6759)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49558
diff changeset
   109
49538
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   110
  $ echo 're:^(?!a).*\.o$' > .hgignore
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   111
  $ hg status
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   112
  A dir/b.o
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   113
  ? .hgignore
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   114
  ? a.c
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   115
  ? a.o
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   116
  ? syntax
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   117
#if rhg
49539
8076298b795a rhg: fallback to slow path on invalid patterns in hgignore
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49538
diff changeset
   118
  $ hg status --config rhg.on-unsupported=abort
8076298b795a rhg: fallback to slow path on invalid patterns in hgignore
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49538
diff changeset
   119
  unsupported feature: Unsupported syntax regex parse error:
49538
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   120
      ^(?:^(?!a).*\.o$)
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   121
           ^^^
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   122
  error: look-around, including look-ahead and look-behind, is not supported
49539
8076298b795a rhg: fallback to slow path on invalid patterns in hgignore
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49538
diff changeset
   123
  [252]
49538
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   124
#endif
b51e5c2ab5fd rhg: add a test involving hgignore lookaround
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49152
diff changeset
   125
33507
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   126
Ensure given files are relative to cwd
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   127
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   128
  $ echo "dir/.*\.o" > .hgignore
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   129
  $ hg status -i
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   130
  I dir/c.o
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   131
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   132
  $ hg debugignore dir/c.o dir/missing.o
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   133
  dir/c.o is ignored
33507
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   134
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: 'dir/.*\.o') (glob)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   135
  dir/missing.o is ignored
33507
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   136
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: 'dir/.*\.o') (glob)
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   137
  $ cd dir
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   138
  $ hg debugignore c.o missing.o
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   139
  c.o is ignored
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   140
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: 'dir/.*\.o') (glob)
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   141
  missing.o is ignored
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   142
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: 'dir/.*\.o') (glob)
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   143
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   144
For icasefs, inexact matches also work, except for missing files
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   145
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   146
#if icasefs
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   147
  $ hg debugignore c.O missing.O
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   148
  c.o is ignored
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   149
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: 'dir/.*\.o') (glob)
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   150
  missing.O is not ignored
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   151
#endif
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   152
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   153
  $ cd ..
e9672de52a23 debugignore: eliminate inconsistencies with `hg status` (issue5222)
Matt Harbison <matt_harbison@yahoo.com>
parents: 33477
diff changeset
   154
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   155
  $ echo ".*\.o" > .hgignore
16487
4fe874697a4d tests: fix incorrect markup of continued lines of sh commands
Mads Kiilerich <mads@kiilerich.com>
parents: 15447
diff changeset
   156
  $ hg status
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   157
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   158
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   159
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   160
  ? syntax
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   161
27326
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   162
Ensure that comments work:
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   163
42633
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   164
  $ touch 'foo#bar' 'quux#' 'quu0#'
27381
988367ac2a2a test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents: 27326
diff changeset
   165
#if no-windows
42633
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   166
  $ touch 'baz\' 'baz\wat' 'ba0\#wat' 'ba1\\' 'ba1\\wat' 'quu0\'
27381
988367ac2a2a test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents: 27326
diff changeset
   167
#endif
42633
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   168
27326
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   169
  $ cat <<'EOF' >> .hgignore
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   170
  > # full-line comment
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   171
  >   # whitespace-only comment line
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   172
  > syntax# pattern, no whitespace, then comment
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   173
  > a.c  # pattern, then whitespace, then comment
42631
24f0023bb8b1 hgignore: update \-escape test to reflect actual behavior
Yuya Nishihara <yuya@tcha.org>
parents: 41721
diff changeset
   174
  > baz\\# # (escaped) backslash, then comment
42632
c67e3f966867 hgignore: add a few more weird patterns to test case
Yuya Nishihara <yuya@tcha.org>
parents: 42631
diff changeset
   175
  > ba0\\\#w # (escaped) backslash, escaped comment character, then comment
c67e3f966867 hgignore: add a few more weird patterns to test case
Yuya Nishihara <yuya@tcha.org>
parents: 42631
diff changeset
   176
  > ba1\\\\# # (escaped) backslashes, then comment
27326
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   177
  > foo\#b # escaped comment character
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   178
  > quux\## escaped comment character at end of name
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   179
  > EOF
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   180
  $ hg status
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   181
  A dir/b.o
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   182
  ? .hgignore
42633
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   183
  ? quu0#
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   184
  ? quu0\ (no-windows !)
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   185
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   186
  $ cat <<'EOF' > .hgignore
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   187
  > .*\.o
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   188
  > syntax: glob
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   189
  > syntax# pattern, no whitespace, then comment
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   190
  > a.c  # pattern, then whitespace, then comment
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   191
  > baz\\#* # (escaped) backslash, then comment
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   192
  > ba0\\\#w* # (escaped) backslash, escaped comment character, then comment
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   193
  > ba1\\\\#* # (escaped) backslashes, then comment
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   194
  > foo\#b* # escaped comment character
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   195
  > quux\## escaped comment character at end of name
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   196
  > quu0[\#]# escaped comment character inside [...]
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   197
  > EOF
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   198
  $ hg status
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   199
  A dir/b.o
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   200
  ? .hgignore
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   201
  ? ba1\\wat (no-windows !)
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   202
  ? baz\wat (no-windows !)
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   203
  ? quu0\ (no-windows !)
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   204
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   205
  $ rm 'foo#bar' 'quux#' 'quu0#'
27381
988367ac2a2a test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents: 27326
diff changeset
   206
#if no-windows
42633
f78f305454fd hgignore: add escape syntax test for glob patterns
Yuya Nishihara <yuya@tcha.org>
parents: 42632
diff changeset
   207
  $ rm 'baz\' 'baz\wat' 'ba0\#wat' 'ba1\\' 'ba1\\wat' 'quu0\'
27381
988367ac2a2a test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents: 27326
diff changeset
   208
#endif
27326
ee2d7b5daa8a test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents: 25870
diff changeset
   209
33477
cc4632679cf9 tests: fix an incorrect description in test-ignore.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 33214
diff changeset
   210
Check that '^\.' does not ignore the root directory:
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   211
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   212
  $ echo "^\." > .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   213
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   214
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   215
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   216
  ? a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   217
  ? dir/c.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   218
  ? syntax
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   219
23628
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   220
Test that patterns from ui.ignore options are read:
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   221
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   222
  $ echo > .hgignore
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   223
  $ cat >> $HGRCPATH << EOF
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   224
  > [ui]
25869
a72e304df528 test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents: 25283
diff changeset
   225
  > ignore.other = $TESTTMP/ignorerepo/.hg/testhgignore
23628
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   226
  > EOF
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   227
  $ echo "glob:**.o" > .hg/testhgignore
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   228
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   229
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   230
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   231
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   232
  ? syntax
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   233
23628
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   234
empty out testhgignore
7d7a4848fff4 test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents: 21815
diff changeset
   235
  $ echo > .hg/testhgignore
23629
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   236
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   237
Test relative ignore path (issue4473):
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   238
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   239
  $ cat >> $HGRCPATH << EOF
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   240
  > [ui]
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   241
  > ignore.relative = .hg/testhgignorerel
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   242
  > EOF
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   243
  $ echo "glob:*.o" > .hg/testhgignorerel
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   244
  $ cd dir
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   245
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   246
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   247
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   248
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   249
  ? syntax
42862
96ddf83fc267 tests: show the pattern generated for a relative glob
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42633
diff changeset
   250
  $ hg debugignore
42864
72890d8f9860 match: simplify the regexps created for glob patterns
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42862
diff changeset
   251
  <includematcher includes='.*\\.o(?:/|$)'>
6479
31abcae33b4f dirstate: do not ignore current directory '.' (issue 1078)
Patrick Mezard <pmezard@gmail.com>
parents: 5029
diff changeset
   252
23629
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   253
  $ cd ..
a04c7b74b3d5 ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 23628
diff changeset
   254
  $ echo > .hg/testhgignorerel
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   255
  $ echo "syntax: glob" > .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   256
  $ echo "re:.*\.o" >> .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   257
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   258
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   259
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   260
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   261
  ? syntax
5029
ac97e065cfc7 Fix re: and glob: patterns in .hgignore (reported by Brad Schick)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4439
diff changeset
   262
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   263
  $ echo "syntax: invalid" > .hgignore
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12312
diff changeset
   264
  $ hg status
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   265
  $TESTTMP/ignorerepo/.hgignore: ignoring invalid syntax 'invalid'
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   266
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   267
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   268
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   269
  ? a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   270
  ? dir/c.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   271
  ? syntax
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   272
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   273
  $ echo "syntax: glob" > .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   274
  $ echo "*.o" >> .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   275
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   276
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   277
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   278
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   279
  ? syntax
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   280
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   281
  $ echo "relglob:syntax*" > .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   282
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   283
  A dir/b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   284
  ? .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   285
  ? a.c
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   286
  ? a.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   287
  ? dir/c.o
1478
e6dd91a88b57 add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   288
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   289
  $ echo "relglob:*" > .hgignore
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   290
  $ hg status
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   291
  A dir/b.o
1491
91c0e8d7ddcf fix a bug in dirstate.changes when cwd != repo.root
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1478
diff changeset
   292
12312
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   293
  $ cd dir
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   294
  $ hg status .
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   295
  A b.o
83a310f2f14a tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents: 6479
diff changeset
   296
13396
3e66eec9a814 add debugignore which yields the combined ignore patten of the .hgignore files
jfh <jason@jasonfharris.com>
parents: 12640
diff changeset
   297
  $ hg debugignore
42864
72890d8f9860 match: simplify the regexps created for glob patterns
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42862
diff changeset
   298
  <includematcher includes='.*(?:/|$)'>
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16487
diff changeset
   299
27671
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   300
  $ hg debugignore b.o
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   301
  b.o is ignored
27757
6ff556ef5a46 test-hgignore: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 27672
diff changeset
   302
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: '*') (glob)
27671
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   303
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16487
diff changeset
   304
  $ cd ..
19128
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   305
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   306
Check patterns that match only the directory
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   307
33214
7367b76ef75c tests: add line specific for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
   308
"(fsmonitor !)" below assumes that fsmonitor is enabled with
7367b76ef75c tests: add line specific for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
   309
"walk_on_invalidate = false" (default), which doesn't involve
7367b76ef75c tests: add line specific for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
   310
re-walking whole repository at detection of .hgignore change.
7367b76ef75c tests: add line specific for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
   311
19128
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   312
  $ echo "^dir\$" > .hgignore
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   313
  $ hg status
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   314
  A dir/b.o
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   315
  ? .hgignore
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   316
  ? a.c
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   317
  ? a.o
33214
7367b76ef75c tests: add line specific for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
   318
  ? dir/c.o (fsmonitor !)
19128
f4930b533d55 hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents: 16913
diff changeset
   319
  ? syntax
21815
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   320
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   321
Check recursive glob pattern matches no directories (dir/**/c.o matches dir/c.o)
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   322
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   323
  $ echo "syntax: glob" > .hgignore
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   324
  $ echo "dir/**/c.o" >> .hgignore
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   325
  $ touch dir/c.o
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   326
  $ mkdir dir/subdir
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   327
  $ touch dir/subdir/c.o
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   328
  $ hg status
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   329
  A dir/b.o
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   330
  ? .hgignore
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   331
  ? a.c
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   332
  ? a.o
a4b67bf1f0a5 match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents: 19128
diff changeset
   333
  ? syntax
27671
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   334
  $ hg debugignore a.c
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   335
  a.c is not ignored
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   336
  $ hg debugignore dir/c.o
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   337
  dir/c.o is ignored
27757
6ff556ef5a46 test-hgignore: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 27672
diff changeset
   338
  (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 2: 'dir/**/c.o') (glob)
25215
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   339
41282
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   340
Check rooted globs
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   341
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   342
  $ hg purge --all --config extensions.purge=
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   343
  $ echo "syntax: rootglob" > .hgignore
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   344
  $ echo "a/*.ext" >> .hgignore
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   345
  $ for p in a b/a aa; do mkdir -p $p; touch $p/b.ext; done
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   346
  $ hg status -A 'set:**.ext'
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   347
  ? aa/b.ext
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   348
  ? b/a/b.ext
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   349
  I a/b.ext
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   350
25215
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   351
Check using 'include:' in ignore file
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   352
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   353
  $ hg purge --all --config extensions.purge=
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   354
  $ touch foo.included
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   355
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   356
  $ echo ".*.included" > otherignore
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   357
  $ hg status -I "include:otherignore"
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   358
  ? foo.included
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   359
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   360
  $ echo "include:otherignore" >> .hgignore
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   361
  $ hg status
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   362
  A dir/b.o
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   363
  ? .hgignore
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   364
  ? otherignore
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   365
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   366
Check recursive uses of 'include:'
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   367
25870
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   368
  $ echo "include:nested/ignore" >> otherignore
41282
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   369
  $ mkdir nested nested/more
25870
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   370
  $ echo "glob:*ignore" > nested/ignore
41282
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   371
  $ echo "rootglob:a" >> nested/ignore
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   372
  $ touch a nested/a nested/more/a
25215
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   373
  $ hg status
4040e06e9b99 match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents: 23629
diff changeset
   374
  A dir/b.o
41282
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   375
  ? nested/a
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   376
  ? nested/more/a
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   377
  $ rm a nested/a nested/more/a
25216
dc562165044a ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents: 25215
diff changeset
   378
25283
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   379
  $ cp otherignore goodignore
25216
dc562165044a ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents: 25215
diff changeset
   380
  $ echo "include:badignore" >> otherignore
dc562165044a ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents: 25215
diff changeset
   381
  $ hg status
35230
feecfefeba25 tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 33507
diff changeset
   382
  skipping unreadable pattern file 'badignore': $ENOENT$
25216
dc562165044a ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents: 25215
diff changeset
   383
  A dir/b.o
25283
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   384
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   385
  $ mv goodignore otherignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   386
25870
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   387
Check using 'include:' while in a non-root directory
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   388
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   389
  $ cd ..
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   390
  $ hg -R ignorerepo status
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   391
  A dir/b.o
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   392
  $ cd ignorerepo
3de48ff62733 ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents: 25869
diff changeset
   393
25283
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   394
Check including subincludes
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   395
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   396
  $ hg revert -q --all
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   397
  $ hg purge --all --config extensions.purge=
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   398
  $ echo ".hgignore" > .hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   399
  $ mkdir dir1 dir2
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   400
  $ touch dir1/file1 dir1/file2 dir2/file1 dir2/file2
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   401
  $ echo "subinclude:dir2/.hgignore" >> .hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   402
  $ echo "glob:file*2" > dir2/.hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   403
  $ hg status
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   404
  ? dir1/file1
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   405
  ? dir1/file2
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   406
  ? dir2/file1
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   407
41282
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   408
Check including subincludes with other patterns
25283
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   409
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   410
  $ echo "subinclude:dir1/.hgignore" >> .hgignore
41282
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   411
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   412
  $ mkdir dir1/subdir
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   413
  $ touch dir1/subdir/file1
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   414
  $ echo "rootglob:f?le1" > dir1/.hgignore
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   415
  $ hg status
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   416
  ? dir1/file2
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   417
  ? dir1/subdir/file1
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   418
  ? dir2/file1
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   419
  $ rm dir1/subdir/file1
4fab8a7d2d72 match: support rooted globs in hgignore
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 40782
diff changeset
   420
25283
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   421
  $ echo "regexp:f.le1" > dir1/.hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   422
  $ hg status
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   423
  ? dir1/file2
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   424
  ? dir2/file1
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   425
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   426
Check multiple levels of sub-ignores
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   427
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   428
  $ touch dir1/subdir/subfile1 dir1/subdir/subfile3 dir1/subdir/subfile4
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   429
  $ echo "subinclude:subdir/.hgignore" >> dir1/.hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   430
  $ echo "glob:subfil*3" >> dir1/subdir/.hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   431
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   432
  $ hg status
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   433
  ? dir1/file2
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   434
  ? dir1/subdir/subfile4
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   435
  ? dir2/file1
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   436
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   437
Check include subignore at the same level
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   438
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   439
  $ mv dir1/subdir/.hgignore dir1/.hgignoretwo
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   440
  $ echo "regexp:f.le1" > dir1/.hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   441
  $ echo "subinclude:.hgignoretwo" >> dir1/.hgignore
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   442
  $ echo "glob:file*2" > dir1/.hgignoretwo
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   443
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   444
  $ hg status | grep file2
19d0e5efa6ca match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents: 25216
diff changeset
   445
  [1]
27671
067d87feeb11 debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents: 27381
diff changeset
   446
  $ hg debugignore dir1/file2
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   447
  dir1/file2 is ignored
27672
f2da9bb87ae0 debugignore: find out why a file is being ignored (issue4856)
Laurent Charignon <lcharignon@fb.com>
parents: 27671
diff changeset
   448
  (ignore rule in dir2/.hgignore, line 1: 'file*2')
28054
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   449
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   450
#if windows
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   451
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   452
Windows paths are accepted on input
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   453
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   454
  $ rm dir1/.hgignore
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   455
  $ echo "dir1/file*" >> .hgignore
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   456
  $ hg debugignore "dir1\file2"
41721
eb8a8af4cbd0 tests: correct the remaining fallout from recent path style changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41282
diff changeset
   457
  dir1/file2 is ignored
28054
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   458
  (ignore rule in $TESTTMP\ignorerepo\.hgignore, line 4: 'dir1/file*')
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   459
  $ hg up -qC .
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   460
8515b813976b debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents: 27757
diff changeset
   461
#endif
47409
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   462
48223
b4f83c9e7905 dirstate-v2: Add support when Rust is not enabled
Simon Sapin <simon.sapin@octobus.net>
parents: 48068
diff changeset
   463
#if dirstate-v2 rust
47409
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   464
47674
ff97e793ed36 dirstate-v2: Introduce a docket file
Simon Sapin <simon.sapin@octobus.net>
parents: 47476
diff changeset
   465
Check the hash of ignore patterns written in the dirstate
48223
b4f83c9e7905 dirstate-v2: Add support when Rust is not enabled
Simon Sapin <simon.sapin@octobus.net>
parents: 48068
diff changeset
   466
This is an optimization that is only relevant when using the Rust extensions
47409
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   467
49558
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   468
  $ cat_filename_and_hash () {
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   469
  >     for i in "$@"; do
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   470
  >         printf "$i "
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   471
  >         cat "$i" | "$TESTDIR"/f --raw-sha1 | sed 's/^raw-sha1=//'
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   472
  >     done
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   473
  > }
47409
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   474
  $ hg status > /dev/null
49558
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   475
  $ cat_filename_and_hash .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   476
  sha1=c0beb296395d48ced8e14f39009c4ea6e409bfe6
49152
eaaf4f98c9f1 dirstate-v2: add flag to `debugstate` to print docket information
Raphaël Gomès <rgomes@octobus.net>
parents: 48681
diff changeset
   477
  $ hg debugstate --docket | grep ignore
49558
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   478
  ignore pattern hash: c0beb296395d48ced8e14f39009c4ea6e409bfe6
47409
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   479
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   480
  $ echo rel > .hg/testhgignorerel
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   481
  $ hg status > /dev/null
49558
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   482
  $ cat_filename_and_hash .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   483
  sha1=b8e63d3428ec38abc68baa27631516d5ec46b7fa
49152
eaaf4f98c9f1 dirstate-v2: add flag to `debugstate` to print docket information
Raphaël Gomès <rgomes@octobus.net>
parents: 48681
diff changeset
   484
  $ hg debugstate --docket | grep ignore
49558
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   485
  ignore pattern hash: b8e63d3428ec38abc68baa27631516d5ec46b7fa
49557
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   486
  $ cd ..
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   487
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   488
Check that the hash depends on the source of the hgignore patterns
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   489
(otherwise the context is lost and things like subinclude are cached improperly)
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   490
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   491
  $ hg init ignore-collision
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   492
  $ cd ignore-collision
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   493
  $ echo > .hg/testhgignorerel
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   494
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   495
  $ mkdir dir1/ dir1/subdir
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   496
  $ touch dir1/subdir/f dir1/subdir/ignored1
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   497
  $ echo 'ignored1' > dir1/.hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   498
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   499
  $ mkdir dir2 dir2/subdir
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   500
  $ touch dir2/subdir/f dir2/subdir/ignored2
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   501
  $ echo 'ignored2' > dir2/.hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   502
  $ echo 'subinclude:dir2/.hgignore' >> .hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   503
  $ echo 'subinclude:dir1/.hgignore' >> .hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   504
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   505
  $ hg commit -Aqm_
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   506
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   507
  $ > dir1/.hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   508
  $ echo 'ignored' > dir2/.hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   509
  $ echo 'ignored1' >> dir2/.hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   510
  $ hg status
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   511
  M dir1/.hgignore
ca19335e86e5 dirstate-v2: add test that shows a collision in ignore patterns hash
Raphaël Gomès <rgomes@octobus.net>
parents: 49539
diff changeset
   512
  M dir2/.hgignore
49558
363923bd51cd dirstate-v2: hash the source of the ignore patterns as well
Raphaël Gomès <rgomes@octobus.net>
parents: 49557
diff changeset
   513
  ? dir1/subdir/ignored1
47409
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   514
0ef8231e413f dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net>
parents: 47281
diff changeset
   515
#endif