# HG changeset patch # User Artem Tikhomirov # Date 1296159877 -3600 # Node ID ace7042a5ce6500b126014efae477f12392ea516 # Parent bcd31a4c638af878c619177399e0f5ee99a9d7bd Internals to HgInternals diff -r bcd31a4c638a -r ace7042a5ce6 cmdline/org/tmatesoft/hg/console/Cat.java --- a/cmdline/org/tmatesoft/hg/console/Cat.java Thu Jan 27 21:22:57 2011 +0100 +++ b/cmdline/org/tmatesoft/hg/console/Cat.java Thu Jan 27 21:24:37 2011 +0100 @@ -19,7 +19,7 @@ import org.tmatesoft.hg.internal.DigestHelper; import org.tmatesoft.hg.repo.HgDataFile; import org.tmatesoft.hg.repo.HgRepository; -import org.tmatesoft.hg.repo.Internals; +import org.tmatesoft.hg.repo.HgInternals; /** @@ -35,7 +35,7 @@ System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); return; } - Internals debug = new Internals(hgRepo); + 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); for (int i = 0; i < toCheck.length; i++) { diff -r bcd31a4c638a -r ace7042a5ce6 cmdline/org/tmatesoft/hg/console/Status.java --- a/cmdline/org/tmatesoft/hg/console/Status.java Thu Jan 27 21:22:57 2011 +0100 +++ b/cmdline/org/tmatesoft/hg/console/Status.java Thu Jan 27 21:24:37 2011 +0100 @@ -28,7 +28,7 @@ import org.tmatesoft.hg.repo.HgDataFile; import org.tmatesoft.hg.repo.HgRepository; import org.tmatesoft.hg.repo.HgStatusInspector; -import org.tmatesoft.hg.repo.Internals; +import org.tmatesoft.hg.repo.HgInternals; import org.tmatesoft.hg.repo.HgStatusCollector; import org.tmatesoft.hg.repo.HgStatusCollector.Record; import org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector; @@ -82,7 +82,7 @@ } private static void bunchOfTests(HgRepository hgRepo) throws Exception { - Internals debug = new Internals(hgRepo); + HgInternals debug = new HgInternals(hgRepo); debug.dumpDirstate(); final StatusDump dump = new StatusDump(); dump.showIgnored = false; diff -r bcd31a4c638a -r ace7042a5ce6 src/org/tmatesoft/hg/repo/HgInternals.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/tmatesoft/hg/repo/HgInternals.java Thu Jan 27 21:24:37 2011 +0100 @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2011 TMate Software Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For information on how to redistribute this software under + * the terms of a license other than GNU General Public License + * contact TMate Software at support@svnkit.com + */ +package org.tmatesoft.hg.repo; + + +/** + * DO NOT USE THIS CLASS, INTENDED FOR TESTING PURPOSES. + * + * Debug helper, to access otherwise restricted (package-local) methods + * + * @author Artem Tikhomirov + * @author TMate Software Ltd. + + */ +public class HgInternals { + + private final HgRepository repo; + + public HgInternals(HgRepository hgRepo) { + repo = hgRepo; + } + + public void dumpDirstate() { + repo.loadDirstate().dump(); + } + + public boolean[] checkIgnored(String... toCheck) { + HgIgnore ignore = repo.getIgnore(); + boolean[] rv = new boolean[toCheck.length]; + for (int i = 0; i < toCheck.length; i++) { + rv[i] = ignore.isIgnored(toCheck[i]); + } + return rv; + } +} diff -r bcd31a4c638a -r ace7042a5ce6 src/org/tmatesoft/hg/repo/Internals.java --- a/src/org/tmatesoft/hg/repo/Internals.java Thu Jan 27 21:22:57 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2011 TMate Software Ltd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For information on how to redistribute this software under - * the terms of a license other than GNU General Public License - * contact TMate Software at support@svnkit.com - */ -package org.tmatesoft.hg.repo; - - -/** - * DO NOT USE THIS CLASS, INTENDED FOR TESTING PURPOSES. - * - * Debug helper, to access otherwise restricted (package-local) methods - * - * @author Artem Tikhomirov - * @author TMate Software Ltd. - - */ -public class Internals { - - private final HgRepository repo; - - public Internals(HgRepository hgRepo) { - repo = hgRepo; - } - - public void dumpDirstate() { - repo.loadDirstate().dump(); - } - - public boolean[] checkIgnored(String... toCheck) { - HgIgnore ignore = repo.getIgnore(); - boolean[] rv = new boolean[toCheck.length]; - for (int i = 0; i < toCheck.length; i++) { - rv[i] = ignore.isIgnored(toCheck[i]); - } - return rv; - } -}