Mercurial > hg4j
diff cmdline/org/tmatesoft/hg/console/Main.java @ 237:6e1373b54e9b
Allow access to working copy content through HgDataFile. Give access to repository's working dir
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 10 Jun 2011 04:35:21 +0200 |
parents | 883300108179 |
children | df9d2854d3d6 |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java Thu Jun 09 06:13:43 2011 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Main.java Fri Jun 10 04:35:21 2011 +0200 @@ -70,12 +70,13 @@ public static void main(String[] args) throws Exception { Main m = new Main(args); + m.testReadWorkingCopy(); // m.testParents(); // m.testEffectiveFileLog(); // m.testCatAtCsetRevision(); // m.testMergeState(); // m.testFileStatus(); - m.dumpBranches(); +// m.dumpBranches(); // m.inflaterLengthException(); // m.dumpIgnored(); // m.dumpDirstate(); @@ -86,6 +87,15 @@ // m.bunchOfTests(); } + private void testReadWorkingCopy() throws Exception { + for (String fname : cmdLineOpts.getList("")) { + HgDataFile fn = hgRepo.getFileNode(fname); + ByteArrayChannel sink = new ByteArrayChannel(); + fn.workingCopy(sink); + System.out.printf("%s: read %d bytes of working copy", fname, sink.toArray().length); + } + } + private void testParents() throws Exception { // hg parents cmd final Pair<Nodeid, Nodeid> wcParents = hgRepo.getWorkingCopyParents();