Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 613:f41dd9a3b8af v1.1m4
Remove few Experimental annotations as the API they've marked graduates
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Fri, 10 May 2013 17:31:27 +0200 |
| parents | 5c68567b3645 |
| children | 272ecffccc8a |
comparison
equal
deleted
inserted
replaced
| 612:dca70c0b1f74 | 613:f41dd9a3b8af |
|---|---|
| 29 | 29 |
| 30 import org.tmatesoft.hg.core.Nodeid; | 30 import org.tmatesoft.hg.core.Nodeid; |
| 31 import org.tmatesoft.hg.core.SessionContext; | 31 import org.tmatesoft.hg.core.SessionContext; |
| 32 import org.tmatesoft.hg.internal.ConfigFile; | 32 import org.tmatesoft.hg.internal.ConfigFile; |
| 33 import org.tmatesoft.hg.internal.DirstateReader; | 33 import org.tmatesoft.hg.internal.DirstateReader; |
| 34 import org.tmatesoft.hg.internal.Experimental; | |
| 35 import org.tmatesoft.hg.internal.Filter; | 34 import org.tmatesoft.hg.internal.Filter; |
| 36 import org.tmatesoft.hg.internal.Internals; | 35 import org.tmatesoft.hg.internal.Internals; |
| 37 import org.tmatesoft.hg.internal.PropertyMarshal; | 36 import org.tmatesoft.hg.internal.PropertyMarshal; |
| 38 import org.tmatesoft.hg.internal.RevlogStream; | 37 import org.tmatesoft.hg.internal.RevlogStream; |
| 39 import org.tmatesoft.hg.internal.SubrepoManager; | 38 import org.tmatesoft.hg.internal.SubrepoManager; |
| 108 private HgBookmarks bookmarks; | 107 private HgBookmarks bookmarks; |
| 109 private HgExtensionsManager extManager; | 108 private HgExtensionsManager extManager; |
| 110 private HgIgnore ignore; | 109 private HgIgnore ignore; |
| 111 private HgRepoConfig repoConfig; | 110 private HgRepoConfig repoConfig; |
| 112 | 111 |
| 112 private HgRepositoryLock wdLock, storeLock; | |
| 113 | |
| 113 private final org.tmatesoft.hg.internal.Internals impl; | 114 private final org.tmatesoft.hg.internal.Internals impl; |
| 114 | 115 |
| 115 /* | 116 /* |
| 116 * TODO [post-1.0] move to a better place, e.g. WorkingCopy container that tracks both dirstate and branches | 117 * TODO [post-1.0] move to a better place, e.g. WorkingCopy container that tracks both dirstate and branches |
| 117 * (and, perhaps, undo, lastcommit and other similar information), and is change listener so that we don't need to | 118 * (and, perhaps, undo, lastcommit and other similar information), and is change listener so that we don't need to |
| 382 } | 383 } |
| 383 } | 384 } |
| 384 } | 385 } |
| 385 } | 386 } |
| 386 | 387 |
| 387 private HgRepositoryLock wdLock, storeLock; | 388 /** |
| 388 | |
| 389 /** | |
| 390 * PROVISIONAL CODE, DO NOT USE | |
| 391 * | |
| 392 * Access repository lock that covers non-store parts of the repository (dirstate, branches, etc - | 389 * Access repository lock that covers non-store parts of the repository (dirstate, branches, etc - |
| 393 * everything that has to do with working directory state). | 390 * everything that has to do with working directory state). |
| 394 * | 391 * |
| 395 * Note, the lock object returned merely gives access to lock mechanism. NO ACTUAL LOCKING IS DONE. | 392 * Note, the lock object returned merely gives access to lock mechanism. NO ACTUAL LOCKING IS DONE. |
| 396 * Use {@link HgRepositoryLock#acquire()} to actually lock the repository. | 393 * Use {@link HgRepositoryLock#acquire()} to actually lock the repository. |
| 397 * | 394 * |
| 398 * @return lock object, never <code>null</code> | 395 * @return lock object, never <code>null</code> |
| 399 */ | 396 */ |
| 400 @Experimental(reason="WORK IN PROGRESS") | |
| 401 public HgRepositoryLock getWorkingDirLock() { | 397 public HgRepositoryLock getWorkingDirLock() { |
| 402 if (wdLock == null) { | 398 if (wdLock == null) { |
| 403 int timeout = getLockTimeout(); | 399 int timeout = getLockTimeout(); |
| 404 File lf = impl.getFileFromRepoDir("wlock"); | 400 File lf = impl.getFileFromRepoDir("wlock"); |
| 405 synchronized (this) { | 401 synchronized (this) { |
| 409 } | 405 } |
| 410 } | 406 } |
| 411 return wdLock; | 407 return wdLock; |
| 412 } | 408 } |
| 413 | 409 |
| 414 @Experimental(reason="WORK IN PROGRESS") | 410 /** |
| 411 * Access repository lock that covers repository intrinsic files, unrelated to | |
| 412 * the state of working directory | |
| 413 * @return lock object, never <code>null</code> | |
| 414 */ | |
| 415 public HgRepositoryLock getStoreLock() { | 415 public HgRepositoryLock getStoreLock() { |
| 416 if (storeLock == null) { | 416 if (storeLock == null) { |
| 417 int timeout = getLockTimeout(); | 417 int timeout = getLockTimeout(); |
| 418 File fl = impl.getFileFromStoreDir("lock"); | 418 File fl = impl.getFileFromStoreDir("lock"); |
| 419 synchronized (this) { | 419 synchronized (this) { |
