Mercurial > hg
annotate tests/test-hgignore @ 4255:ef1f1a4b2efb
glob:<directory> patterns match the files in that directory.
This makes the behaviour of glob: patterns more consistent:
hg status glob:dir and hg status -I glob:dir will match
the same files.
It's also consistent with the fact that {rel,}path patterns
recursively match the contents of a directory.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 20 Mar 2007 22:09:55 -0300 |
parents | 182f500805db |
children | 4e521a3ee5eb |
rev | line source |
---|---|
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
1 #!/bin/sh |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
2 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
3 hg init |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
4 touch a.o |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
5 touch a.c |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
6 touch syntax |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
7 mkdir dir |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
8 touch dir/a.o |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
9 touch dir/b.o |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
10 touch dir/c.o |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
11 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
12 hg add dir/a.o |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
13 hg commit -m 0 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
14 hg add dir/b.o |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
15 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
16 echo "--" ; hg status |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
17 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
18 echo "*.o" > .hgignore |
2009
182f500805db
Fix broken hgignore tests due to full path showing up in output.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1568
diff
changeset
|
19 echo "--" ; hg status 2>&1 | sed -e 's/abort: .*\.hgignore:/abort: .hgignore:/' |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
20 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
21 echo ".*\.o" > .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
22 echo "--" ; hg status |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
23 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
24 # XXX: broken |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
25 #echo "glob:**.o" > .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
26 #echo "--" ; hg status |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
27 # |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
28 #echo "glob:*.o" > .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
29 #echo "--" ; hg status |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
30 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
31 echo "syntax: invalid" > .hgignore |
2009
182f500805db
Fix broken hgignore tests due to full path showing up in output.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1568
diff
changeset
|
32 echo "--" ; hg status 2>&1 | sed -e 's/.*\.hgignore:/.hgignore:/' |
1478
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
33 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
34 echo "syntax: glob" > .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
35 echo "*.o" >> .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
36 echo "--" ; hg status |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
37 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
38 echo "relglob:syntax*" > .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
39 echo "--" ; hg status |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
40 |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
41 echo "relglob:*" > .hgignore |
e6dd91a88b57
add a test for hgignore
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
42 echo "--" ; hg status |
1491
91c0e8d7ddcf
fix a bug in dirstate.changes when cwd != repo.root
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1478
diff
changeset
|
43 |
91c0e8d7ddcf
fix a bug in dirstate.changes when cwd != repo.root
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1478
diff
changeset
|
44 cd dir |
1568
1d7d0c07e8f3
make all commands be repo-wide by default
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1491
diff
changeset
|
45 echo "--" ; hg status . |