Package org.tmatesoft.hg.internal

Examples of org.tmatesoft.hg.internal.RelativePathRewrite


    fc.dump(getClass(), Error, ex, "message");
  }
 
  private void testTreeTraversal() throws Exception {
    File repoRoot = hgRepo.getWorkingDir();
    Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), hgRepo.getToRepoPathHelper()));
    FileWalker w =  new FileWalker(new BasicSessionContext(null), repoRoot, pathSrc);
    int count = 0;
    final long start = System.currentTimeMillis();
    while (w.hasNext()) {
      count++;
View Full Code Here


  public void testCheckoutLinkAndExec() throws Exception {
    File testRepoLoc = cloneRepoToTempLocation("test-flags", "test-checkout-flags", true);
    repo = new HgLookup().detect(testRepoLoc);
    new HgCheckoutCommand(repo).clean(true).changeset(0).execute();

    Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(testRepoLoc), repo.getToRepoPathHelper()));
    FileWalker fw = new FileWalker(repo, testRepoLoc, pathSrc, null);
    int execFound, linkFound, regularFound;
    execFound = linkFound = regularFound = 0;
    while(fw.hasNext()) {
      fw.next();
View Full Code Here

  }
 
  @Test
  public void testFlagsInWorkingCopy() throws Exception {
    File repoRoot = repo.getWorkingDir();
    Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), repo.getToRepoPathHelper()));
    FileWalker fw = new FileWalker(repo, repoRoot, pathSrc, null);
   
    if (Internals.runningOnWindows()) {
      System.out.println("Executing tests on Windows, no actual file flags in working area are checked");
      assertFalse(fw.supportsExecFlag());
View Full Code Here

    }
  }
 
  /*package-local*/ FileIterator createWorkingDirWalker(Path.Matcher workindDirScope) {
    File repoRoot = repo.getWorkingDir();
    Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), repo.getToRepoPathHelper()));
    // Impl note: simple source is enough as files in the working dir are all unique
    // even if they might get reused (i.e. after FileIterator#reset() and walking once again),
    // path caching is better to be done in the code which knows that path are being reused
    return new FileWalker(repo, repoRoot, pathSrc, workindDirScope);
  }
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.internal.RelativePathRewrite

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.