Mercurial > hg4j
diff test/org/tmatesoft/hg/test/TestBlame.java @ 552:45751456b471
Annotate file changes through few revisions, walking either direction (old to new and vice versa)
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 20 Feb 2013 22:23:50 +0100 |
parents | 83afa680555d |
children | 093a2022dad5 |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestBlame.java Wed Feb 20 18:19:52 2013 +0100 +++ b/test/org/tmatesoft/hg/test/TestBlame.java Wed Feb 20 22:23:50 2013 +0100 @@ -30,6 +30,7 @@ import org.junit.Rule; import org.junit.Test; import org.tmatesoft.hg.console.Bundle.Dump; +import org.tmatesoft.hg.core.HgIterateDirection; import org.tmatesoft.hg.internal.AnnotateFacility; import org.tmatesoft.hg.internal.AnnotateFacility.AddBlock; import org.tmatesoft.hg.internal.AnnotateFacility.Block; @@ -78,7 +79,7 @@ OutputParser.Stub op = new OutputParser.Stub(); ExecHelper eh = new ExecHelper(op, null); - for (int startChangeset : new int[] { TIP, /*539, 541/ *, TIP */}) { + for (int startChangeset : new int[] { 539, 541 /*, TIP */}) { FileAnnotateInspector fa = new FileAnnotateInspector(); new AnnotateFacility().annotate(df, startChangeset, fa); @@ -142,7 +143,7 @@ af.annotateChange(df, 531, dump); FileAnnotateInspector fai = new FileAnnotateInspector(); - af.annotate(df, TIP, fai); + af.annotate(df, 541, fai); for (int i = 0; i < fai.lineRevisions.length; i++) { System.out.printf("%3d: LINE %d\n", fai.lineRevisions[i], i+1); } @@ -155,13 +156,15 @@ HgDataFile df = repo.getFileNode(fname); AnnotateFacility af = new AnnotateFacility(); DiffOutInspector dump = new DiffOutInspector(System.out); - System.out.println("413 -> 415"); - af.diff(df, 413, 415, dump); - System.out.println("408 -> 415"); - af.diff(df, 408, 415, dump); - System.out.println("Combined (with merge):"); +// System.out.println("413 -> 415"); +// af.diff(df, 413, 415, dump); +// System.out.println("408 -> 415"); +// af.diff(df, 408, 415, dump); +// System.out.println("Combined (with merge):"); +// dump.needRevisions(true); +// af.annotateChange(df, checkChangeset, dump); dump.needRevisions(true); - af.annotateChange(df, checkChangeset, dump); + af.annotate(df, checkChangeset, dump, HgIterateDirection.OldToNew); } private void leftovers() throws Exception {