comparison cmdline/org/tmatesoft/hg/console/Main.java @ 350:33eaed1ad130

Allow FileIterator report any errors from the underlaying file system up to the client
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 29 Nov 2011 03:46:17 +0100
parents a0864b2892cd
children 5f9073eabf06
comparison
equal deleted inserted replaced
349:bba9f52cacf3 350:33eaed1ad130
17 package org.tmatesoft.hg.console; 17 package org.tmatesoft.hg.console;
18 18
19 import static org.tmatesoft.hg.repo.HgRepository.TIP; 19 import static org.tmatesoft.hg.repo.HgRepository.TIP;
20 20
21 import java.io.File; 21 import java.io.File;
22 import java.io.IOException;
22 import java.util.ArrayList; 23 import java.util.ArrayList;
23 import java.util.Collection; 24 import java.util.Collection;
24 import java.util.Collections; 25 import java.util.Collections;
25 import java.util.HashSet; 26 import java.util.HashSet;
26 import java.util.List; 27 import java.util.List;
362 final ByteArrayChannel sink = new ByteArrayChannel(); 363 final ByteArrayChannel sink = new ByteArrayChannel();
363 r.putContentTo(sink); 364 r.putContentTo(sink);
364 return String.format("%s %s (%d bytes)", r.getPath(), r.getRevision(), sink.toArray().length); 365 return String.format("%s %s (%d bytes)", r.getPath(), r.getRevision(), sink.toArray().length);
365 } 366 }
366 367
367 private void testFileStatus() { 368 private void testFileStatus() throws IOException {
368 // final Path path = Path.create("src/org/tmatesoft/hg/util/"); 369 // final Path path = Path.create("src/org/tmatesoft/hg/util/");
369 // final Path path = Path.create("src/org/tmatesoft/hg/internal/Experimental.java"); 370 // final Path path = Path.create("src/org/tmatesoft/hg/internal/Experimental.java");
370 // final Path path = Path.create("missing-dir/"); 371 // final Path path = Path.create("missing-dir/");
371 // HgWorkingCopyStatusCollector wcsc = HgWorkingCopyStatusCollector.create(hgRepo, path); 372 // HgWorkingCopyStatusCollector wcsc = HgWorkingCopyStatusCollector.create(hgRepo, path);
372 HgWorkingCopyStatusCollector wcsc = HgWorkingCopyStatusCollector.create(hgRepo, new PathGlobMatcher("mi**")); 373 HgWorkingCopyStatusCollector wcsc = HgWorkingCopyStatusCollector.create(hgRepo, new PathGlobMatcher("mi**"));