Mercurial > hg4j
diff test/org/tmatesoft/hg/test/TestByteChannel.java @ 121:b1d6208fb517
Conditionally apply filters to file content
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 04 Feb 2011 03:37:09 +0100 |
parents | 5d13dcaaff39 |
children | 7567f4a42fe5 |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestByteChannel.java Fri Feb 04 03:23:47 2011 +0100 +++ b/test/org/tmatesoft/hg/test/TestByteChannel.java Fri Feb 04 03:37:09 2011 +0100 @@ -33,7 +33,7 @@ public static void main(String[] args) throws Exception { RepositoryFacade rf = new RepositoryFacade(); rf.init(); - HgDataFile file = rf.getRepository().getFileNode("TODO"); + HgDataFile file = rf.getRepository().getFileNode("src/org/tmatesoft/hg/internal/KeywordFilter.java"); for (int i = file.getRevisionCount() - 1; i >= 0; i--) { System.out.print("Content for revision:" + i); compareContent(file, i); @@ -45,7 +45,7 @@ private static void compareContent(HgDataFile file, int rev) throws Exception { byte[] oldAccess = file.content(rev); ByteArrayChannel ch = new ByteArrayChannel(); - file.content(rev, ch); + file.content(rev, ch, false); byte[] newAccess = ch.toArray(); Assert.assertArrayEquals(oldAccess, newAccess); // don't trust anyone (even JUnit)