* see {@link FileWalker#FileWalker(File, Path.Source, Path.Matcher)})
*
* @return new instance of {@link HgWorkingCopyStatusCollector}, ready to {@link #walk(int, HgStatusInspector) walk} associated working copy
*/
public static HgWorkingCopyStatusCollector create(HgRepository hgRepo, Path.Matcher scope) {
FileIterator w = new HgInternals(hgRepo).createWorkingDirWalker(null);
FileIterator wf = (scope == null || scope instanceof Path.Matcher.Any) ? w : new FileIteratorFilter(w, scope);
// the reason I need to iterate over full repo and apply filter is that I have no idea whatsoever about
// patterns in the scope. I.e. if scope lists a file (PathGlobMatcher("a/b/c.txt")), FileWalker won't get deep
// to the file unless matcher would also explicitly include "a/", "a/b/" in scope. Since I can't rely
// users would write robust matchers, and I don't see a decent way to enforce that (i.e. factory to produce
// correct matcher from Path is much like what PathScope does, and can be accessed directly with #create(repo, Path...)