Mercurial > hg4j
diff src/org/tmatesoft/hg/core/RepositoryFacade.java @ 115:c0cc2535462c
Introduced channels to pipeline (and easily filter) data streams
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 03 Feb 2011 23:32:08 +0100 |
parents | 0c9804857000 |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/RepositoryFacade.java Thu Feb 03 22:13:55 2011 +0100 +++ b/src/org/tmatesoft/hg/core/RepositoryFacade.java Thu Feb 03 23:32:08 2011 +0100 @@ -41,6 +41,13 @@ repo = new HgLookup().detect(repoLocation.getCanonicalPath()); return repo != null && !repo.isInvalid(); } + + public HgRepository getRepository() { + if (repo == null) { + throw new IllegalStateException("Call any of #init*() methods first first"); + } + return repo; + } public LogCommand createLogCommand() { return new LogCommand(repo/*, getCommandContext()*/);