comparison src/org/tmatesoft/hg/repo/HgIgnore.java @ 141:8248aae33f7d

Adopt FileIterator moving towards WCStatusCollector parameterizing. Improved path handling, move 'em around
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 17 Feb 2011 04:08:34 +0100
parents 46291ec605a0
children fad70a9e6c7f
comparison
equal deleted inserted replaced
140:1c1891ad1c73 141:8248aae33f7d
23 import java.util.ArrayList; 23 import java.util.ArrayList;
24 import java.util.Collections; 24 import java.util.Collections;
25 import java.util.List; 25 import java.util.List;
26 import java.util.regex.Pattern; 26 import java.util.regex.Pattern;
27 27
28 import org.tmatesoft.hg.util.Path;
29
28 /** 30 /**
31 * Handling of ignored paths according to .hgignore configuration
29 * 32 *
30 * @author Artem Tikhomirov 33 * @author Artem Tikhomirov
31 * @author TMate Software Ltd. 34 * @author TMate Software Ltd.
32 */ 35 */
33 public class HgIgnore { 36 public class HgIgnore {
117 sb.append(ch); 120 sb.append(ch);
118 } 121 }
119 return sb.toString(); 122 return sb.toString();
120 } 123 }
121 124
122 // TODO use Path and PathGlobMatcher 125 // TODO use PathGlobMatcher
123 public boolean isIgnored(String path) { 126 public boolean isIgnored(Path path) {
124 for (Pattern p : entries) { 127 for (Pattern p : entries) {
125 if (p.matcher(path).find()) { 128 if (p.matcher(path).find()) {
126 return true; 129 return true;
127 } 130 }
128 } 131 }