Mercurial > hg4j
diff src/org/tmatesoft/hg/util/FileIterator.java @ 226:26ad7827a62d
Support status query for a single file or a subdirectory of a repository
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 25 May 2011 12:16:24 +0200 |
parents | 8248aae33f7d |
children | ed6b74a58c66 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/FileIterator.java Wed May 25 05:13:43 2011 +0200 +++ b/src/org/tmatesoft/hg/util/FileIterator.java Wed May 25 12:16:24 2011 +0200 @@ -18,6 +18,8 @@ import java.io.File; +import org.tmatesoft.hg.internal.Experimental; + /** * Abstracts iteration over file system. * @@ -47,7 +49,19 @@ Path name(); /** + * File object to retrieve actual state from. Not necessarily exist, if {@link FileIterator} is used to query status + * of specific files. * @return filesystem element. */ File file(); + + /** + * When {@link FileIterator} represents only fraction of a repository, library might need to figure out if + * specific file (path) belongs to that fraction or not. Paths (and {@link File Files} returned by this {@link FileIterator} + * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if + * asked. + * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path + */ + @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") + boolean inScope(Path file); }