Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgIgnore.java @ 271:c8baeb813d74
Include tests for hgignore into the suite
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 24 Aug 2011 04:17:55 +0200 |
| parents | 7af843ecc378 |
| children | 086a326f181f |
comparison
equal
deleted
inserted
replaced
| 270:c6450b0b1fd5 | 271:c8baeb813d74 |
|---|---|
| 114 // '*' at the beginning and end of a line are useless for Pattern | 114 // '*' at the beginning and end of a line are useless for Pattern |
| 115 // XXX although how about **.txt - such globs can be seen in a config, are they valid for HgIgnore? | 115 // XXX although how about **.txt - such globs can be seen in a config, are they valid for HgIgnore? |
| 116 while (start <= end && line.charAt(start) == '*') start++; | 116 while (start <= end && line.charAt(start) == '*') start++; |
| 117 while (end > start && line.charAt(end) == '*') end--; | 117 while (end > start && line.charAt(end) == '*') end--; |
| 118 | 118 |
| 119 if (line.endsWith(".so")) { | |
| 120 System.out.println(); | |
| 121 } | |
| 122 int inCurly = 0; | 119 int inCurly = 0; |
| 123 for (int i = start; i <= end; i++) { | 120 for (int i = start; i <= end; i++) { |
| 124 char ch = line.charAt(i); | 121 char ch = line.charAt(i); |
| 125 if (ch == '.' || ch == '\\') { | 122 if (ch == '.' || ch == '\\') { |
| 126 sb.append('\\'); | 123 sb.append('\\'); |
