Mercurial > hg-stable
annotate tests/test-hgignore.t @ 30037:cd7276f7ea83
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 01 Oct 2016 15:10:38 -0400 |
parents | 8515b813976b |
children | 952017471f93 |
rev | line source |
---|---|
25869
a72e304df528
test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents:
25283
diff
changeset
|
1 $ hg init ignorerepo |
a72e304df528
test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents:
25283
diff
changeset
|
2 $ cd ignorerepo |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
3 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12376
diff
changeset
|
4 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
|
5 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
6 $ touch foo |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
7 $ touch bar |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
8 $ touch baz |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
9 $ cat > makeignore.py <<EOF |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
10 > f = open(".hgignore", "w") |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
11 > f.write("ignore\n") |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
12 > f.write("foo\n") |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
13 > # No EOL here |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
14 > f.write("bar") |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
15 > f.close() |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
16 > EOF |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
17 |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
18 $ python makeignore.py |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
19 |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
20 Should display baz only: |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
21 |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
22 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
23 ? baz |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
24 |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
25 $ 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
|
26 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
27 $ touch a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
28 $ touch a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
29 $ touch syntax |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
30 $ mkdir dir |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
31 $ touch dir/a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
32 $ touch dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
33 $ touch dir/c.o |
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 $ hg add dir/a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
36 $ hg commit -m 0 |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
37 $ hg add dir/b.o |
4439
4e521a3ee5eb
Test issue 562: .hgignore requires newline at end
Patrick Mezard <pmezard@gmail.com>
parents:
2009
diff
changeset
|
38 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
39 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
40 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
41 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
42 ? a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
43 ? dir/c.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
44 ? syntax |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
45 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
46 $ echo "*.o" > .hgignore |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12312
diff
changeset
|
47 $ hg status |
25869
a72e304df528
test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents:
25283
diff
changeset
|
48 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
|
49 [255] |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
50 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
51 $ echo ".*\.o" > .hgignore |
16487
4fe874697a4d
tests: fix incorrect markup of continued lines of sh commands
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
52 $ hg status |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
53 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
54 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
55 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
56 ? syntax |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
57 |
27326
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
58 Ensure that comments work: |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
59 |
27381
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
60 $ touch 'foo#bar' 'quux#' |
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
61 #if no-windows |
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
62 $ touch 'baz\#wat' |
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
63 #endif |
27326
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
64 $ cat <<'EOF' >> .hgignore |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
65 > # full-line comment |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
66 > # whitespace-only comment line |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
67 > syntax# pattern, no whitespace, then comment |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
68 > a.c # pattern, then whitespace, then comment |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
69 > baz\\# # escaped comment character |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
70 > foo\#b # escaped comment character |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
71 > 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
|
72 > EOF |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
73 $ hg status |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
74 A dir/b.o |
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
75 ? .hgignore |
27381
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
76 $ rm 'foo#bar' 'quux#' |
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
77 #if no-windows |
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
78 $ rm 'baz\#wat' |
988367ac2a2a
test-hgignore: conditionalize an illegal Windows filename
Matt Harbison <matt_harbison@yahoo.com>
parents:
27326
diff
changeset
|
79 #endif |
27326
ee2d7b5daa8a
test-hgignore.t: add tests for comments
Bryan O'Sullivan <bos@serpentine.com>
parents:
25870
diff
changeset
|
80 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
81 Check it does not ignore the current directory '.': |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
82 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
83 $ echo "^\." > .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
84 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
85 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
86 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
87 ? a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
88 ? dir/c.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
89 ? syntax |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
90 |
23628
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
91 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
|
92 |
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
93 $ echo > .hgignore |
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
94 $ cat >> $HGRCPATH << EOF |
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
95 > [ui] |
25869
a72e304df528
test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents:
25283
diff
changeset
|
96 > ignore.other = $TESTTMP/ignorerepo/.hg/testhgignore |
23628
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
97 > EOF |
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
98 $ echo "glob:**.o" > .hg/testhgignore |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
99 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
100 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
101 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
102 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
103 ? syntax |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
104 |
23628
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
105 empty out testhgignore |
7d7a4848fff4
test-hgignore: add testing for ui.ignore
Siddharth Agarwal <sid0@fb.com>
parents:
21815
diff
changeset
|
106 $ echo > .hg/testhgignore |
23629
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
107 |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
108 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
|
109 |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
110 $ cat >> $HGRCPATH << EOF |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
111 > [ui] |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
112 > ignore.relative = .hg/testhgignorerel |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
113 > EOF |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
114 $ 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
|
115 $ cd dir |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
116 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
117 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
118 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
119 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
120 ? syntax |
6479
31abcae33b4f
dirstate: do not ignore current directory '.' (issue 1078)
Patrick Mezard <pmezard@gmail.com>
parents:
5029
diff
changeset
|
121 |
23629
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
122 $ cd .. |
a04c7b74b3d5
ignore: resolve ignore files relative to repo root (issue4473) (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
23628
diff
changeset
|
123 $ echo > .hg/testhgignorerel |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
124 $ echo "syntax: glob" > .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
125 $ echo "re:.*\.o" >> .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
126 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
127 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
128 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
129 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
130 ? syntax |
5029
ac97e065cfc7
Fix re: and glob: patterns in .hgignore (reported by Brad Schick)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4439
diff
changeset
|
131 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
132 $ 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
|
133 $ hg status |
25869
a72e304df528
test: move ignore test run into a subdirectory
Durham Goode <durham@fb.com>
parents:
25283
diff
changeset
|
134 $TESTTMP/ignorerepo/.hgignore: ignoring invalid syntax 'invalid' (glob) |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
135 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
136 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
137 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
138 ? a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
139 ? dir/c.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
140 ? syntax |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
141 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
142 $ echo "syntax: glob" > .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
143 $ echo "*.o" >> .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
144 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
145 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
146 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
147 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
148 ? syntax |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
149 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
150 $ echo "relglob:syntax*" > .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
151 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
152 A dir/b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
153 ? .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
154 ? a.c |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
155 ? a.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
156 ? dir/c.o |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
157 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
158 $ echo "relglob:*" > .hgignore |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
159 $ hg status |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
160 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
|
161 |
12312
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
162 $ cd dir |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
163 $ hg status . |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
164 A b.o |
83a310f2f14a
tests: unify test-hgignore
Adrian Buehlmann <adrian@cadifra.com>
parents:
6479
diff
changeset
|
165 |
13396
3e66eec9a814
add debugignore which yields the combined ignore patten of the .hgignore files
jfh <jason@jasonfharris.com>
parents:
12640
diff
changeset
|
166 $ hg debugignore |
3e66eec9a814
add debugignore which yields the combined ignore patten of the .hgignore files
jfh <jason@jasonfharris.com>
parents:
12640
diff
changeset
|
167 (?:(?:|.*/)[^/]*(?:/|$)) |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16487
diff
changeset
|
168 |
27671
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
169 $ hg debugignore b.o |
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
170 b.o is ignored |
27757
6ff556ef5a46
test-hgignore: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
27672
diff
changeset
|
171 (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
|
172 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16487
diff
changeset
|
173 $ cd .. |
19128
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
174 |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
175 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
|
176 |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
177 $ echo "^dir\$" > .hgignore |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
178 $ hg status |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
179 A dir/b.o |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
180 ? .hgignore |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
181 ? a.c |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
182 ? a.o |
f4930b533d55
hgignore: fix regression with hgignore directory matches (issue3921)
Durham Goode <durham@fb.com>
parents:
16913
diff
changeset
|
183 ? syntax |
21815
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
184 |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
185 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
|
186 |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
187 $ echo "syntax: glob" > .hgignore |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
188 $ echo "dir/**/c.o" >> .hgignore |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
189 $ touch dir/c.o |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
190 $ mkdir dir/subdir |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
191 $ touch dir/subdir/c.o |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
192 $ hg status |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
193 A dir/b.o |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
194 ? .hgignore |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
195 ? a.c |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
196 ? a.o |
a4b67bf1f0a5
match: make glob '**/' match the empty string
Siddharth Agarwal <sid0@fb.com>
parents:
19128
diff
changeset
|
197 ? syntax |
27671
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
198 $ hg debugignore a.c |
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
199 a.c is not ignored |
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
200 $ hg debugignore dir/c.o |
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
201 dir/c.o is ignored |
27757
6ff556ef5a46
test-hgignore: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
27672
diff
changeset
|
202 (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
|
203 |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
204 Check using 'include:' in ignore file |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
205 |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
206 $ hg purge --all --config extensions.purge= |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
207 $ touch foo.included |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
208 |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
209 $ echo ".*.included" > otherignore |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
210 $ hg status -I "include:otherignore" |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
211 ? foo.included |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
212 |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
213 $ echo "include:otherignore" >> .hgignore |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
214 $ hg status |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
215 A dir/b.o |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
216 ? .hgignore |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
217 ? otherignore |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
218 |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
219 Check recursive uses of 'include:' |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
220 |
25870
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
221 $ echo "include:nested/ignore" >> otherignore |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
222 $ mkdir nested |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
223 $ echo "glob:*ignore" > nested/ignore |
25215
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
224 $ hg status |
4040e06e9b99
match: add 'include:' syntax
Durham Goode <durham@fb.com>
parents:
23629
diff
changeset
|
225 A dir/b.o |
25216
dc562165044a
ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents:
25215
diff
changeset
|
226 |
25283
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
227 $ cp otherignore goodignore |
25216
dc562165044a
ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents:
25215
diff
changeset
|
228 $ echo "include:badignore" >> otherignore |
dc562165044a
ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents:
25215
diff
changeset
|
229 $ hg status |
dc562165044a
ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents:
25215
diff
changeset
|
230 skipping unreadable pattern file 'badignore': No such file or directory |
dc562165044a
ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com>
parents:
25215
diff
changeset
|
231 A dir/b.o |
25283
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
232 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
233 $ mv goodignore otherignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
234 |
25870
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
235 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
|
236 |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
237 $ cd .. |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
238 $ hg -R ignorerepo status |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
239 A dir/b.o |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
240 $ cd ignorerepo |
3de48ff62733
ignore: fix include: rules depending on current directory (issue4759)
Durham Goode <durham@fb.com>
parents:
25869
diff
changeset
|
241 |
25283
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
242 Check including subincludes |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
243 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
244 $ hg revert -q --all |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
245 $ hg purge --all --config extensions.purge= |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
246 $ echo ".hgignore" > .hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
247 $ mkdir dir1 dir2 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
248 $ touch dir1/file1 dir1/file2 dir2/file1 dir2/file2 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
249 $ echo "subinclude:dir2/.hgignore" >> .hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
250 $ echo "glob:file*2" > dir2/.hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
251 $ hg status |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
252 ? dir1/file1 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
253 ? dir1/file2 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
254 ? dir2/file1 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
255 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
256 Check including subincludes with regexs |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
257 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
258 $ echo "subinclude:dir1/.hgignore" >> .hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
259 $ echo "regexp:f.le1" > dir1/.hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
260 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
261 $ hg status |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
262 ? dir1/file2 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
263 ? dir2/file1 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
264 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
265 Check multiple levels of sub-ignores |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
266 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
267 $ mkdir dir1/subdir |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
268 $ touch dir1/subdir/subfile1 dir1/subdir/subfile3 dir1/subdir/subfile4 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
269 $ echo "subinclude:subdir/.hgignore" >> dir1/.hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
270 $ echo "glob:subfil*3" >> dir1/subdir/.hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
271 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
272 $ hg status |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
273 ? dir1/file2 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
274 ? dir1/subdir/subfile4 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
275 ? dir2/file1 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
276 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
277 Check include subignore at the same level |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
278 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
279 $ mv dir1/subdir/.hgignore dir1/.hgignoretwo |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
280 $ echo "regexp:f.le1" > dir1/.hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
281 $ echo "subinclude:.hgignoretwo" >> dir1/.hgignore |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
282 $ echo "glob:file*2" > dir1/.hgignoretwo |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
283 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
284 $ hg status | grep file2 |
19d0e5efa6ca
match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com>
parents:
25216
diff
changeset
|
285 [1] |
27671
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
286 $ hg debugignore dir1/file2 |
067d87feeb11
debugignore: find out if a file is being ignored
Laurent Charignon <lcharignon@fb.com>
parents:
27381
diff
changeset
|
287 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
|
288 (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
|
289 |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
290 #if windows |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
291 |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
292 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
|
293 |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
294 $ rm dir1/.hgignore |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
295 $ echo "dir1/file*" >> .hgignore |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
296 $ hg debugignore "dir1\file2" |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
297 dir1\file2 is ignored |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
298 (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
|
299 $ hg up -qC . |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
300 |
8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com>
parents:
27757
diff
changeset
|
301 #endif |