Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgInternals.java @ 442:6865eb742883
Tests for subrepo API, refactor status tests for reuse, better subrepos API
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Fri, 27 Apr 2012 20:57:20 +0200 |
| parents | 12f668401613 |
| children | 51d682cf9cdc |
comparison
equal
deleted
inserted
replaced
| 441:2a08466838d3 | 442:6865eb742883 |
|---|---|
| 23 import java.io.IOException; | 23 import java.io.IOException; |
| 24 import java.io.Reader; | 24 import java.io.Reader; |
| 25 import java.net.InetAddress; | 25 import java.net.InetAddress; |
| 26 import java.net.UnknownHostException; | 26 import java.net.UnknownHostException; |
| 27 | 27 |
| 28 import org.tmatesoft.hg.core.Nodeid; | |
| 28 import org.tmatesoft.hg.core.SessionContext; | 29 import org.tmatesoft.hg.core.SessionContext; |
| 29 import org.tmatesoft.hg.internal.Experimental; | 30 import org.tmatesoft.hg.internal.Experimental; |
| 30 import org.tmatesoft.hg.internal.Internals; | 31 import org.tmatesoft.hg.internal.Internals; |
| 31 import org.tmatesoft.hg.internal.RelativePathRewrite; | 32 import org.tmatesoft.hg.internal.RelativePathRewrite; |
| 32 import org.tmatesoft.hg.internal.WinToNixPathRewrite; | 33 import org.tmatesoft.hg.internal.WinToNixPathRewrite; |
| 34 import org.tmatesoft.hg.repo.HgSubrepoLocation.Kind; | |
| 33 import org.tmatesoft.hg.util.FileIterator; | 35 import org.tmatesoft.hg.util.FileIterator; |
| 34 import org.tmatesoft.hg.util.FileWalker; | 36 import org.tmatesoft.hg.util.FileWalker; |
| 35 import org.tmatesoft.hg.util.Path; | 37 import org.tmatesoft.hg.util.Path; |
| 36 import org.tmatesoft.hg.util.PathRewrite; | 38 import org.tmatesoft.hg.util.PathRewrite; |
| 37 | 39 |
| 38 | 40 |
| 39 /** | 41 /** |
| 40 * DO NOT USE THIS CLASS, INTENDED FOR TESTING PURPOSES. | 42 * DO NOT USE THIS CLASS, INTENDED FOR TESTING PURPOSES. |
| 41 * | 43 * |
| 42 * This class gives access to repository internals, and holds methods that I'm not confident have to be widely accessible | 44 * <p>This class is not part of the public API and may change or vanish any moment. |
| 45 * | |
| 46 * <p>This class gives access to repository internals, and holds methods that I'm not confident have to be widely accessible | |
| 43 * Debug helper, to access otherwise restricted (package-local) methods | 47 * Debug helper, to access otherwise restricted (package-local) methods |
| 44 * | 48 * |
| 45 * @author Artem Tikhomirov | 49 * @author Artem Tikhomirov |
| 46 * @author TMate Software Ltd. | 50 * @author TMate Software Ltd. |
| 47 */ | 51 */ |
| 78 Path[] rv = new Path[toCheck.length]; | 82 Path[] rv = new Path[toCheck.length]; |
| 79 for (int i = 0; i < toCheck.length; i++) { | 83 for (int i = 0; i < toCheck.length; i++) { |
| 80 rv[i] = dirstate.known(toCheck[i]); | 84 rv[i] = dirstate.known(toCheck[i]); |
| 81 } | 85 } |
| 82 return rv; | 86 return rv; |
| 87 } | |
| 88 | |
| 89 public HgSubrepoLocation newSubrepo(Path loc, String src, Kind kind, Nodeid rev) { | |
| 90 return new HgSubrepoLocation(repo, loc, src, kind, rev); | |
| 83 } | 91 } |
| 84 | 92 |
| 85 public static File getRepositoryDir(HgRepository hgRepo) { | 93 public static File getRepositoryDir(HgRepository hgRepo) { |
| 86 return hgRepo.getRepositoryRoot(); | 94 return hgRepo.getRepositoryRoot(); |
| 87 } | 95 } |
