Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/Internals.java @ 501:d2f6ab541330
Change the way extensions are accessed (with ExtensionsManager now), add preliminary Rebase extension support
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 29 Oct 2012 19:04:13 +0100 |
| parents | ba36f66c32b4 |
| children | bf352ce2b97f |
comparison
equal
deleted
inserted
replaced
| 500:465316bf97e8 | 501:d2f6ab541330 |
|---|---|
| 40 * Fields/members that shall not be visible | 40 * Fields/members that shall not be visible |
| 41 * | 41 * |
| 42 * @author Artem Tikhomirov | 42 * @author Artem Tikhomirov |
| 43 * @author TMate Software Ltd. | 43 * @author TMate Software Ltd. |
| 44 */ | 44 */ |
| 45 public final class Internals { | 45 public final class Internals implements SessionContext.Source { |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * Allows to specify Mercurial installation directory to detect installation-wide configurations. | 48 * Allows to specify Mercurial installation directory to detect installation-wide configurations. |
| 49 * Without this property set, hg4j would attempt to deduce this value locating hg executable. | 49 * Without this property set, hg4j would attempt to deduce this value locating hg executable. |
| 50 */ | 50 */ |
| 93 SessionContext ctx = repo.getSessionContext(); | 93 SessionContext ctx = repo.getSessionContext(); |
| 94 shallCacheRevlogsInRepo = new PropertyMarshal(ctx).getBoolean(CFG_PROPERTY_REVLOG_STREAM_CACHE, true); | 94 shallCacheRevlogsInRepo = new PropertyMarshal(ctx).getBoolean(CFG_PROPERTY_REVLOG_STREAM_CACHE, true); |
| 95 dataAccess = new DataAccessProvider(ctx); | 95 dataAccess = new DataAccessProvider(ctx); |
| 96 RepoInitializer repoInit = new RepoInitializer().initRequiresFromFile(repoDir); | 96 RepoInitializer repoInit = new RepoInitializer().initRequiresFromFile(repoDir); |
| 97 requiresFlags = repoInit.getRequires(); | 97 requiresFlags = repoInit.getRequires(); |
| 98 dataPathHelper = repoInit.buildDataFilesHelper(getContext()); | 98 dataPathHelper = repoInit.buildDataFilesHelper(getSessionContext()); |
| 99 repoPathHelper = repoInit.buildStoreFilesHelper(); | 99 repoPathHelper = repoInit.buildStoreFilesHelper(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 public boolean isInvalid() { | 102 public boolean isInvalid() { |
| 103 return !repoDir.exists() || !repoDir.isDirectory(); | 103 return !repoDir.exists() || !repoDir.isDirectory(); |
| 133 public File getFileFromDataDir(CharSequence path) { | 133 public File getFileFromDataDir(CharSequence path) { |
| 134 CharSequence storagePath = dataPathHelper.rewrite(path); | 134 CharSequence storagePath = dataPathHelper.rewrite(path); |
| 135 return new File(repoDir, storagePath.toString()); | 135 return new File(repoDir, storagePath.toString()); |
| 136 } | 136 } |
| 137 | 137 |
| 138 public SessionContext getContext() { | 138 public SessionContext getSessionContext() { |
| 139 return repo.getSessionContext(); | 139 return repo.getSessionContext(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 public HgRepository getRepo() { | 142 public HgRepository getRepo() { |
| 143 return repo; | 143 return repo; |
