Mercurial > hg4j
view src/com/tmate/hgkit/ll/Internals.java @ 69:5a69397f0f99
Discovery utility for Hg network protocol finally in the repo, with quick-n-dirty ConfigFile impl that helps to hide auth info
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 22 Jan 2011 22:53:57 +0100 |
parents | b771e94a4f7c |
children |
line wrap: on
line source
/* * Copyright (c) 2011 Artem Tikhomirov */ package com.tmate.hgkit.ll; /** * DO NOT USE THIS CLASS, INTENDED FOR TESTING PURPOSES. * * Debug helper, to access otherwise restricted (package-local) methods * * @author artem */ public class Internals { private final HgRepository repo; public Internals(HgRepository hgRepo) { this.repo = hgRepo; } public void dumpDirstate() { if (repo instanceof LocalHgRepo) { ((LocalHgRepo) repo).loadDirstate().dump(); } } public boolean[] checkIgnored(String... toCheck) { if (repo instanceof LocalHgRepo) { HgIgnore ignore = ((LocalHgRepo) repo).loadIgnore(); boolean[] rv = new boolean[toCheck.length]; for (int i = 0; i < toCheck.length; i++) { rv[i] = ignore.isIgnored(toCheck[i]); } return rv; } return new boolean[0]; } }