Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgSubrepoLocation.java @ 403:2747b0723867
FIXMEs: work on exceptions and javadoc
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 05 Mar 2012 14:50:51 +0100 |
| parents | 981f9f50bb6c |
| children | 9c9c442b5f2e |
comparison
equal
deleted
inserted
replaced
| 402:1fcc7f7b6d65 | 403:2747b0723867 |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 TMate Software Ltd | 2 * Copyright (c) 2011-2012 TMate Software Ltd |
| 3 * | 3 * |
| 4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
| 5 * it under the terms of the GNU General Public License as published by | 5 * it under the terms of the GNU General Public License as published by |
| 6 * the Free Software Foundation; version 2 of the License. | 6 * the Free Software Foundation; version 2 of the License. |
| 7 * | 7 * |
| 86 return owner; | 86 return owner; |
| 87 } | 87 } |
| 88 | 88 |
| 89 public HgRepository getRepo() throws HgInvalidFileException { | 89 public HgRepository getRepo() throws HgInvalidFileException { |
| 90 if (kind != Kind.Hg) { | 90 if (kind != Kind.Hg) { |
| 91 throw new HgBadStateException(); | 91 throw new HgBadStateException(String.format("Unsupported subrepository %s", kind)); |
| 92 } | 92 } |
| 93 return new HgLookup().detect(new File(owner.getWorkingDir(), source)); | 93 return new HgLookup().detect(new File(owner.getWorkingDir(), source)); |
| 94 } | 94 } |
| 95 } | 95 } |
