diff src/org/tmatesoft/hg/core/StatusCommand.java @ 127:2e395db595e2

Moved HgStatus to toplevel
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 16 Feb 2011 18:42:10 +0100
parents 4f509f5bc8cb
children 44b97930570c
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/StatusCommand.java	Tue Feb 15 07:03:14 2011 +0100
+++ b/src/org/tmatesoft/hg/core/StatusCommand.java	Wed Feb 16 18:42:10 2011 +0100
@@ -16,13 +16,12 @@
  */
 package org.tmatesoft.hg.core;
 
-import static org.tmatesoft.hg.core.StatusCommand.HgStatus.Kind.*;
+import static org.tmatesoft.hg.core.HgStatus.Kind.*;
 import static org.tmatesoft.hg.repo.HgRepository.*;
 
 import java.util.ConcurrentModificationException;
 
 import org.tmatesoft.hg.core.Path.Matcher;
-import org.tmatesoft.hg.core.StatusCommand.HgStatus.Kind;
 import org.tmatesoft.hg.repo.HgRepository;
 import org.tmatesoft.hg.repo.HgStatusCollector;
 import org.tmatesoft.hg.repo.HgStatusInspector;
@@ -177,42 +176,6 @@
 		void handleStatus(HgStatus s);
 	}
 
-	public static class HgStatus {
-		public enum Kind {
-			Modified, Added, Removed, Unknown, Missing, Clean, Ignored
-		};
-		private final Kind kind;
-		private final Path path;
-		private final Path origin;
-		
-		HgStatus(Kind kind, Path path) {
-			this(kind, path, null);
-		}
-
-		HgStatus(Kind kind, Path path, Path copyOrigin) {
-			this.kind = kind;
-			this.path  = path;
-			origin = copyOrigin;
-		}
-
-		public Kind getKind() {
-			return kind;
-		}
-
-		public Path getPath() {
-			return path;
-		}
-
-		public Path getOriginalPath() {
-			return origin;
-		}
-
-		public boolean isCopy() {
-			return origin != null;
-		}
-	}
-
-	
 	private class Mediator implements HgStatusInspector {
 		boolean needModified;
 		boolean needAdded;
@@ -257,7 +220,7 @@
 		public void copied(Path fnameOrigin, Path fnameAdded) {
 			if (needCopies) {
 				if (matcher == null || matcher.accept(fnameAdded)) {
-					handler.handleStatus(new HgStatus(Kind.Added, fnameAdded, fnameOrigin));
+					handler.handleStatus(new HgStatus(Added, fnameAdded, fnameOrigin));
 				}
 			}
 		}