diff 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
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgInternals.java	Thu Apr 26 12:42:32 2012 +0200
+++ b/src/org/tmatesoft/hg/repo/HgInternals.java	Fri Apr 27 20:57:20 2012 +0200
@@ -25,11 +25,13 @@
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 
+import org.tmatesoft.hg.core.Nodeid;
 import org.tmatesoft.hg.core.SessionContext;
 import org.tmatesoft.hg.internal.Experimental;
 import org.tmatesoft.hg.internal.Internals;
 import org.tmatesoft.hg.internal.RelativePathRewrite;
 import org.tmatesoft.hg.internal.WinToNixPathRewrite;
+import org.tmatesoft.hg.repo.HgSubrepoLocation.Kind;
 import org.tmatesoft.hg.util.FileIterator;
 import org.tmatesoft.hg.util.FileWalker;
 import org.tmatesoft.hg.util.Path;
@@ -39,7 +41,9 @@
 /**
  * DO NOT USE THIS CLASS, INTENDED FOR TESTING PURPOSES.
  * 
- * This class gives access to repository internals, and holds methods that I'm not confident have to be widely accessible
+ * <p>This class is not part of the public API and may change or vanish any moment.
+ * 
+ * <p>This class gives access to repository internals, and holds methods that I'm not confident have to be widely accessible
  * Debug helper, to access otherwise restricted (package-local) methods
  * 
  * @author Artem Tikhomirov
@@ -81,6 +85,10 @@
 		}
 		return rv;
 	}
+	
+	public HgSubrepoLocation newSubrepo(Path loc, String src, Kind kind, Nodeid rev) {
+		return new HgSubrepoLocation(repo, loc, src, kind, rev);
+	}
 
 	public static File getRepositoryDir(HgRepository hgRepo) {
 		return hgRepo.getRepositoryRoot();