diff src/org/tmatesoft/hg/core/HgManifestCommand.java @ 231:1792b37650f2

Introduced access to conflict resolution information (merge state)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 01 Jun 2011 05:44:25 +0200
parents 373e07cd3991
children 4c3b9f679412
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgManifestCommand.java	Tue May 31 05:33:16 2011 +0200
+++ b/src/org/tmatesoft/hg/core/HgManifestCommand.java	Wed Jun 01 05:44:25 2011 +0200
@@ -25,7 +25,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.tmatesoft.hg.core.HgLogCommand.FileRevision;
 import org.tmatesoft.hg.repo.HgManifest;
 import org.tmatesoft.hg.repo.HgRepository;
 import org.tmatesoft.hg.util.Path;
@@ -124,7 +123,7 @@
 	public interface Handler {
 		void begin(Nodeid manifestRevision);
 		void dir(Path p); // optionally invoked (if walker was configured to spit out directories) prior to any files from this dir and subdirs
-		void file(FileRevision fileRevision); // XXX allow to check p is invalid (df.exists())
+		void file(HgLogCommand.FileRevision fileRevision); // XXX allow to check p is invalid (df.exists())
 		void end(Nodeid manifestRevision);
 	}
 
@@ -134,7 +133,7 @@
 		// However, once HgManifest.Inspector switches to Path objects, perhaps global Path pool
 		// might be more effective?
 		private PathPool pathPool;
-		private List<FileRevision> manifestContent;
+		private List<HgFileRevision> manifestContent;
 		private Nodeid manifestNodeid;
 		
 		public void start() {
@@ -149,27 +148,27 @@
 	
 		public boolean begin(int manifestRevision, Nodeid nid, int changelogRevision) {
 			if (needDirs && manifestContent == null) {
-				manifestContent = new LinkedList<FileRevision>();
+				manifestContent = new LinkedList<HgFileRevision>();
 			}
 			visitor.begin(manifestNodeid = nid);
 			return true;
 		}
 		public boolean end(int revision) {
 			if (needDirs) {
-				LinkedHashMap<Path, LinkedList<FileRevision>> breakDown = new LinkedHashMap<Path, LinkedList<FileRevision>>();
-				for (FileRevision fr : manifestContent) {
+				LinkedHashMap<Path, LinkedList<HgFileRevision>> breakDown = new LinkedHashMap<Path, LinkedList<HgFileRevision>>();
+				for (HgFileRevision fr : manifestContent) {
 					Path filePath = fr.getPath();
 					Path dirPath = pathPool.parent(filePath);
-					LinkedList<FileRevision> revs = breakDown.get(dirPath);
+					LinkedList<HgFileRevision> revs = breakDown.get(dirPath);
 					if (revs == null) {
-						revs = new LinkedList<FileRevision>();
+						revs = new LinkedList<HgFileRevision>();
 						breakDown.put(dirPath, revs);
 					}
 					revs.addLast(fr);
 				}
 				for (Path dir : breakDown.keySet()) {
 					visitor.dir(dir);
-					for (FileRevision fr : breakDown.get(dir)) {
+					for (HgFileRevision fr : breakDown.get(dir)) {
 						visitor.file(fr);
 					}
 				}
@@ -184,7 +183,7 @@
 			if (matcher != null && !matcher.accept(p)) {
 				return true;
 			}
-			FileRevision fr = new FileRevision(repo, nid, p);
+			HgFileRevision fr = new HgFileRevision(repo, nid, p);
 			if (needDirs) {
 				manifestContent.add(fr);
 			} else {