Mercurial > hg4j
diff cmdline/org/tmatesoft/hg/console/Main.java @ 339:863356c2847e
Issue 16: respect glob patterns in HgIgnore for sub-directories
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 16 Nov 2011 22:42:21 +0100 |
parents | a674b8590362 |
children | a54bfe0db959 |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java Tue Nov 15 04:47:03 2011 +0100 +++ b/cmdline/org/tmatesoft/hg/console/Main.java Wed Nov 16 22:42:21 2011 +0100 @@ -49,6 +49,7 @@ import org.tmatesoft.hg.repo.HgDirstate; import org.tmatesoft.hg.repo.HgDirstate.EntryKind; import org.tmatesoft.hg.repo.HgDirstate.Record; +import org.tmatesoft.hg.repo.HgIgnore; import org.tmatesoft.hg.repo.HgInternals; import org.tmatesoft.hg.repo.HgManifest; import org.tmatesoft.hg.repo.HgManifest.Flags; @@ -89,7 +90,7 @@ public static void main(String[] args) throws Exception { Main m = new Main(args); - m.buildFileLog(); +// m.buildFileLog(); // m.testConsoleLog(); // m.testTreeTraversal(); // m.testRevisionMap(); @@ -98,7 +99,7 @@ // m.testParents(); // m.testEffectiveFileLog(); // m.testCatAtCsetRevision(); -// m.testMergeState(); + m.testMergeState(); // m.testFileStatus(); // m.dumpBranches(); // m.inflaterLengthException(); @@ -413,11 +414,10 @@ } private void dumpIgnored() { - HgInternals debug = new HgInternals(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); + HgIgnore ignore = hgRepo.getIgnore(); for (int i = 0; i < toCheck.length; i++) { - System.out.println("Ignored " + toCheck[i] + ": " + checkResult[i]); + System.out.println("Ignored " + toCheck[i] + ": " + ignore.isIgnored(Path.create(toCheck[i]))); } }