Mercurial > jhg
diff src/com/tmate/hgkit/console/Cat.java @ 59:b771e94a4f7c
Introduce Internals to keep LocalHgRepo casts and alike in a single place. WCSC optionally to reuse SC data
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 18 Jan 2011 00:08:15 +0100 |
parents | 92c3d0920d58 |
children |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/console/Cat.java Mon Jan 17 23:01:19 2011 +0100 +++ b/src/com/tmate/hgkit/console/Cat.java Tue Jan 18 00:08:15 2011 +0100 @@ -6,9 +6,8 @@ import com.tmate.hgkit.fs.RepositoryLookup; import com.tmate.hgkit.ll.DigestHelper; import com.tmate.hgkit.ll.HgDataFile; -import com.tmate.hgkit.ll.HgIgnore; import com.tmate.hgkit.ll.HgRepository; -import com.tmate.hgkit.ll.LocalHgRepo; +import com.tmate.hgkit.ll.Internals; /** * @author artem @@ -24,9 +23,11 @@ System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); return; } - HgIgnore ignore = ((LocalHgRepo) hgRepo).loadIgnore(); - for (String s : new String[] {"design.txt", "src/com/tmate/hgkit/ll/Changelog.java", "src/Extras.java", "bin/com/tmate/hgkit/ll/Changelog.class"} ) { - System.out.println("Ignored " + s + ": " + ignore.isIgnored(s)); + Internals debug = new Internals(hgRepo); + String[] toCheck = new String[] {"design.txt", "src/com/tmate/hgkit/ll/Changelog.java", "src/Extras.java", "bin/com/tmate/hgkit/ll/Changelog.class"}; + boolean[] checkResult = debug.checkIgnored(toCheck); + for (int i = 0; i < toCheck.length; i++) { + System.out.println("Ignored " + toCheck[i] + ": " + checkResult[i]); } DigestHelper dh = new DigestHelper(); for (String fname : cmdLineOpts.files) {