diff src/com/tmate/hgkit/ll/LocalHgRepo.java @ 59:b771e94a4f7c

Introduce Internals to keep LocalHgRepo casts and alike in a single place. WCSC optionally to reuse SC data
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 18 Jan 2011 00:08:15 +0100
parents 4cfc47bc14cc
children 19e9e220bf68
line wrap: on
line diff
--- a/src/com/tmate/hgkit/ll/LocalHgRepo.java	Mon Jan 17 23:01:19 2011 +0100
+++ b/src/com/tmate/hgkit/ll/LocalHgRepo.java	Tue Jan 18 00:08:15 2011 +0100
@@ -3,20 +3,14 @@
  */
 package com.tmate.hgkit.ll;
 
-import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileFilter;
 import java.io.FileInputStream;
-import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.lang.ref.SoftReference;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Set;
 import java.util.TreeSet;
 
 import com.tmate.hgkit.fs.DataAccessProvider;
@@ -56,9 +50,8 @@
 	}
 	
 	// XXX package-local, unless there are cases when required from outside (guess, working dir/revision walkers may hide dirstate access and no public visibility needed)
-	public final HgDirstate loadDirstate() {
-		// XXX may cache in SoftReference if creation is expensive
-		return new HgDirstate(this, new File(repoDir, "dirstate"));
+	final HgDirstate loadDirstate() {
+		return new HgDirstate(getDataAccess(), new File(repoDir, "dirstate"));
 	}
 
 	// package-local, see comment for loadDirstate