Package org.tmatesoft.hg.core

Examples of org.tmatesoft.hg.core.HgLogCommand.order()


    report("HgChangesetTreeHandler+RenameHandler with followRenames = false, default iteration order", h2.getResult(), true);
   
    //
    // Now, check that iteration in opposite direction (new to old)
    // still reports renames (and correct revisions, too)
    cmd.order(HgIterateDirection.NewToOld);
    cmd.execute(h1 = new CollectWithRenameHandler());
    errorCollector.assertEquals(1, h1.rh.renames.size());
    assertRename(fname1, fname2, h1.rh.renames.get(0));
    h2 = new TreeCollectHandler(false);
    rh = new RenameCollector(h2);
View Full Code Here


    eh.run("hg", "log", "--debug", "--follow", fname, "--cwd", repo.getLocation());
    HgLogCommand cmd = new HgLogCommand(repo);
    cmd.file(fname, true, true);
    CollectWithRenameHandler h1;
    //
    cmd.order(OldToNew).execute(h1 = new CollectWithRenameHandler());
    errorCollector.assertEquals(2, h1.rh.renames.size());
    report("Follow a->c->b, old2new:", h1.getChanges(), true);
    //
    cmd.order(NewToOld).execute(h1 = new CollectWithRenameHandler());
    errorCollector.assertEquals(2, h1.rh.renames.size());
View Full Code Here

    //
    cmd.order(OldToNew).execute(h1 = new CollectWithRenameHandler());
    errorCollector.assertEquals(2, h1.rh.renames.size());
    report("Follow a->c->b, old2new:", h1.getChanges(), true);
    //
    cmd.order(NewToOld).execute(h1 = new CollectWithRenameHandler());
    errorCollector.assertEquals(2, h1.rh.renames.size());
    report("Follow a->c->b, new2old:", h1.getChanges(), false);
    //
    //
    TreeCollectHandler h2 = new TreeCollectHandler(false);
View Full Code Here

    report("Follow a->c->b, new2old:", h1.getChanges(), false);
    //
    //
    TreeCollectHandler h2 = new TreeCollectHandler(false);
    RenameCollector rh = new RenameCollector(h2);
    cmd.order(OldToNew).execute(h2);
    errorCollector.assertEquals(2, rh.renames.size());
    report("Tree. Follow a->c->b, old2new:", h2.getResult(), true);
    //
    h2 = new TreeCollectHandler(false);
    rh = new RenameCollector(h2);
View Full Code Here

    errorCollector.assertEquals(2, rh.renames.size());
    report("Tree. Follow a->c->b, old2new:", h2.getResult(), true);
    //
    h2 = new TreeCollectHandler(false);
    rh = new RenameCollector(h2);
    cmd.order(NewToOld).execute(h2);
    errorCollector.assertEquals(2, rh.renames.size());
    report("Tree. Follow a->c->b, new2old:", h2.getResult(), false);
  }
 
  private void assertRename(String fnameFrom, String fnameTo, Pair<HgFileRevision, HgFileRevision> rename) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.