Package org.tmatesoft.hg.util

Examples of org.tmatesoft.hg.util.FileIterator


      }
    }
//    final Path[] dirs = f.toArray(new Path[d.size()]);
    if (d.isEmpty()) {
      final Path[] files = f.toArray(new Path[f.size()]);
      FileIterator fi = new FileListIterator(hgRepo.getSessionContext(), hgRepo.getWorkingDir(), files);
      return new HgWorkingCopyStatusCollector(hgRepo, fi);
    }
    //
   
    //FileIterator fi = file.isDirectory() ? new DirFileIterator(hgRepo, file) : new FileListIterator(, file);
    FileIterator fi = new HgInternals(hgRepo).createWorkingDirWalker(new PathScope(true, paths));
    return new HgWorkingCopyStatusCollector(hgRepo, fi);
  }
View Full Code Here


   * 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...)
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.util.FileIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.