Mercurial > jhg
comparison src/org/tmatesoft/hg/util/FileIterator.java @ 444:b3b1db9301a2
Few comments that emerged while working on examples
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 15 May 2012 20:19:22 +0200 |
parents | 7f27122011c3 |
children |
comparison
equal
deleted
inserted
replaced
443:072b5f3ed0c8 | 444:b3b1db9301a2 |
---|---|
16 */ | 16 */ |
17 package org.tmatesoft.hg.util; | 17 package org.tmatesoft.hg.util; |
18 | 18 |
19 import java.io.IOException; | 19 import java.io.IOException; |
20 | 20 |
21 import org.tmatesoft.hg.internal.Experimental; | 21 import org.tmatesoft.hg.repo.HgStatusCollector; |
22 import org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector; | |
22 | 23 |
23 /** | 24 /** |
24 * Abstracts iteration over file system. | 25 * Abstracts iteration over file system. |
25 * | 26 * |
26 * @author Artem Tikhomirov | 27 * @author Artem Tikhomirov |
58 /** | 59 /** |
59 * When {@link FileIterator} represents only fraction of a repository, library might need to figure out if | 60 * When {@link FileIterator} represents only fraction of a repository, library might need to figure out if |
60 * specific file (path) belongs to that fraction or not. Paths and files returned by this {@link FileIterator} | 61 * specific file (path) belongs to that fraction or not. Paths and files returned by this {@link FileIterator} |
61 * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if | 62 * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if |
62 * asked. | 63 * asked. |
64 * <p> | |
65 * Implementors are advised to use {@link Path.Matcher}, as this scope is very similar to what regular | |
66 * {@link HgStatusCollector} (which doesn't use FI) supports, and use of matcher makes {@link HgWorkingCopyStatusCollector} | |
67 * look similar. | |
68 * | |
63 * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path | 69 * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path |
64 */ | 70 */ |
65 @Experimental(reason="Perhaps, shall not be part of FileIterator, but rather separate Path.Matcher. Approaches in regular StatusCollector (doesn't use FI, but supports scope) and WC collector to look similar, and for HgStatusCommand to use single approach to set the scope") | |
66 boolean inScope(Path file); // PathMatcher scope() | 71 boolean inScope(Path file); // PathMatcher scope() |
67 | 72 |
68 /** | 73 /** |
69 * Tells whether caller shall be aware of distinction between executable and non-executable files coming from this iterator. | 74 * Tells whether caller shall be aware of distinction between executable and non-executable files coming from this iterator. |
70 * Note, these days Mercurial (as of 2.1) doesn't recognize Windows .exe files as executable (nor it treats any Windows filesystem as exec-capable) | 75 * Note, these days Mercurial (as of 2.1) doesn't recognize Windows .exe files as executable (nor it treats any Windows filesystem as exec-capable) |