Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 423:9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Fri, 23 Mar 2012 22:51:18 +0100 |
| parents | fdd7d756dea0 |
| children | 48f993aa2f41 |
comparison
equal
deleted
inserted
replaced
| 422:5d1cc7366d04 | 423:9c9c442b5f2e |
|---|---|
| 24 import java.util.Collections; | 24 import java.util.Collections; |
| 25 import java.util.HashMap; | 25 import java.util.HashMap; |
| 26 import java.util.List; | 26 import java.util.List; |
| 27 | 27 |
| 28 import org.tmatesoft.hg.core.HgException; | 28 import org.tmatesoft.hg.core.HgException; |
| 29 import org.tmatesoft.hg.core.HgInvalidControlFileException; | |
| 30 import org.tmatesoft.hg.core.HgInvalidRevisionException; | |
| 31 import org.tmatesoft.hg.core.Nodeid; | 29 import org.tmatesoft.hg.core.Nodeid; |
| 32 import org.tmatesoft.hg.core.SessionContext; | 30 import org.tmatesoft.hg.core.SessionContext; |
| 33 import org.tmatesoft.hg.internal.ByteArrayChannel; | 31 import org.tmatesoft.hg.internal.ByteArrayChannel; |
| 34 import org.tmatesoft.hg.internal.ConfigFile; | 32 import org.tmatesoft.hg.internal.ConfigFile; |
| 35 import org.tmatesoft.hg.internal.DataAccessProvider; | 33 import org.tmatesoft.hg.internal.DataAccessProvider; |
| 73 * Revision index constant to indicate working copy | 71 * Revision index constant to indicate working copy |
| 74 */ | 72 */ |
| 75 public static final int WORKING_COPY = -2; // XXX WORKING_COPY_REVISION? | 73 public static final int WORKING_COPY = -2; // XXX WORKING_COPY_REVISION? |
| 76 | 74 |
| 77 /** | 75 /** |
| 78 * Constant ({@value #NO_REVISION}) to indicate revision absence (e.g. missing parent in from {@link HgChangelog#parents(int, int[], byte[], byte[])} call) | 76 * Constant ({@value #NO_REVISION}) to indicate revision absence or a fictitious revision of an empty repository. |
| 79 * or a fictitious revision of an empty repository, to use as an argument (contrary to {@link #BAD_REVISION}) | 77 * |
| 80 * e.g in a status operation to visit changes from the very beginning of a repository. | 78 * <p>Revision absence is vital e.g. for missing parent from {@link HgChangelog#parents(int, int[], byte[], byte[])} call and |
| 79 * to report cases when changeset records no corresponding manifest | |
| 80 * revision {@link HgManifest#walk(int, int, org.tmatesoft.hg.repo.HgManifest.Inspector)}. | |
| 81 * | |
| 82 * <p> Use as imaginary revision/empty repository is handy as an argument (contrary to {@link #BAD_REVISION}) | |
| 83 * e.g in a status operation to visit changes from the very beginning of a repository. | |
| 81 */ | 84 */ |
| 82 public static final int NO_REVISION = -1; | 85 public static final int NO_REVISION = -1; |
| 83 | 86 |
| 84 /** | 87 /** |
| 85 * Name of the primary branch, "default". | 88 * Name of the primary branch, "default". |
