Show More
@@ -57,10 +57,13 b' def ignore(root, files, warn):' | |||
|
57 | 57 | warn(_("%s: ignoring invalid syntax '%s'\n") % (f, s)) |
|
58 | 58 | continue |
|
59 | 59 | pat = syntax + line |
|
60 |
for s in syntaxes. |
|
|
61 | if line.startswith(s): | |
|
60 | for s, rels in syntaxes.items(): | |
|
61 | if line.startswith(rels): | |
|
62 | 62 | pat = line |
|
63 | 63 | break |
|
64 | elif line.startswith(s+':'): | |
|
65 | pat = rels + line[len(s)+1:] | |
|
66 | break | |
|
64 | 67 | pats[f].append(pat) |
|
65 | 68 | except IOError, inst: |
|
66 | 69 | if f != files[0]: |
@@ -40,12 +40,15 b' echo "--" ; hg status 2>&1 | sed -e \'s/a' | |||
|
40 | 40 | echo ".*\.o" > .hgignore |
|
41 | 41 | echo "--" ; hg status |
|
42 | 42 | |
|
43 | # XXX: broken | |
|
44 | #echo "glob:**.o" > .hgignore | |
|
45 | #echo "--" ; hg status | |
|
46 | # | |
|
47 | #echo "glob:*.o" > .hgignore | |
|
48 | #echo "--" ; hg status | |
|
43 | echo "glob:**.o" > .hgignore | |
|
44 | echo "--" ; hg status | |
|
45 | ||
|
46 | echo "glob:*.o" > .hgignore | |
|
47 | echo "--" ; hg status | |
|
48 | ||
|
49 | echo "syntax: glob" > .hgignore | |
|
50 | echo "re:.*\.o" >> .hgignore | |
|
51 | echo "--" ; hg status | |
|
49 | 52 | |
|
50 | 53 | echo "syntax: invalid" > .hgignore |
|
51 | 54 | echo "--" ; hg status 2>&1 | sed -e 's/.*\.hgignore:/.hgignore:/' |
@@ -14,6 +14,21 b' A dir/b.o' | |||
|
14 | 14 | ? a.c |
|
15 | 15 | ? syntax |
|
16 | 16 | -- |
|
17 | A dir/b.o | |
|
18 | ? .hgignore | |
|
19 | ? a.c | |
|
20 | ? syntax | |
|
21 | -- | |
|
22 | A dir/b.o | |
|
23 | ? .hgignore | |
|
24 | ? a.c | |
|
25 | ? syntax | |
|
26 | -- | |
|
27 | A dir/b.o | |
|
28 | ? .hgignore | |
|
29 | ? a.c | |
|
30 | ? syntax | |
|
31 | -- | |
|
17 | 32 | .hgignore: ignoring invalid syntax 'invalid' |
|
18 | 33 | A dir/b.o |
|
19 | 34 | ? .hgignore |
General Comments 0
You need to be logged in to leave comments.
Login now