Package org.tmatesoft.hg.util

Examples of org.tmatesoft.hg.util.FileInfo


    FileWalker fw = new FileWalker(repo, testRepoLoc, pathSrc, null);
    int execFound, linkFound, regularFound;
    execFound = linkFound = regularFound = 0;
    while(fw.hasNext()) {
      fw.next();
      FileInfo fi = fw.file();
      boolean executable = fi.isExecutable();
      boolean symlink = fi.isSymlink();
      if (executable) {
        execFound++;
      }
      if (symlink) {
        linkFound++;
View Full Code Here


    boolean exec, link, file;
    exec = link = file = false;
    while (fw.hasNext()) {
      fw.next();
      FileInfo fi = fw.file();
      String fn = fw.name().toString();
      if (fn.equals("file-link")) {
        link = true;
        errorCollector.assertTrue("Symlink shall exist despite the fact it points to nowhere", fi.exists());
        errorCollector.assertFalse(fi.isExecutable());
        errorCollector.assertTrue(fi.isSymlink());
      } else if (fn.equals("file-exec")) {
        exec = true;
        errorCollector.assertTrue(fi.isExecutable());
        errorCollector.assertFalse(fi.isSymlink());
      } else if (fn.equals("regular-file")) {
        file = true;
        errorCollector.assertFalse(fi.isExecutable());
        errorCollector.assertFalse(fi.isSymlink());
      }
    }
    errorCollector.assertTrue("Missing executable file in WC", exec);
    errorCollector.assertTrue("Missing symlink in WC", link);
    errorCollector.assertTrue("Missing regular file in WC", file);
View Full Code Here

    TreeSet<Path> knownEntries = ds.all(); // here just to get dirstate initialized
    while (repoWalker.hasNext()) {
      cs.checkCancelled();
      repoWalker.next();
      final Path fname = getPathPool().mangle(repoWalker.name());
      FileInfo f = repoWalker.file();
      Path knownInDirstate;
      if (!f.exists()) {
        // file coming from iterator doesn't exist.
        if ((knownInDirstate = ds.known(fname)) != null) {
          // found in dirstate
          processed.add(knownInDirstate);
          if (ds.checkRemoved(knownInDirstate) == null) {
View Full Code Here

TOP

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

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.