Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgRepoFacade.java @ 143:b9700740553a
Command line tools parse and respect most of command-line arguments
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 17 Feb 2011 22:16:25 +0100 |
| parents | aa1629f36482 |
| children | 1a7a9a20e1f9 |
comparison
equal
deleted
inserted
replaced
| 142:37a34044e6bd | 143:b9700740553a |
|---|---|
| 29 */ | 29 */ |
| 30 public class HgRepoFacade { | 30 public class HgRepoFacade { |
| 31 private HgRepository repo; | 31 private HgRepository repo; |
| 32 | 32 |
| 33 public HgRepoFacade() { | 33 public HgRepoFacade() { |
| 34 } | |
| 35 | |
| 36 public boolean init(HgRepository hgRepo) { | |
| 37 if (hgRepo == null) { | |
| 38 throw new IllegalArgumentException(); | |
| 39 } | |
| 40 repo = hgRepo; | |
| 41 return !repo.isInvalid(); | |
| 34 } | 42 } |
| 35 | 43 |
| 36 public boolean init() throws Exception /*FIXME RepoInitException*/ { | 44 public boolean init() throws Exception /*FIXME RepoInitException*/ { |
| 37 repo = new HgLookup().detectFromWorkingDir(); | 45 repo = new HgLookup().detectFromWorkingDir(); |
| 38 return repo != null && !repo.isInvalid(); | 46 return repo != null && !repo.isInvalid(); |
