diff src/org/tmatesoft/hg/core/HgStatusCommand.java @ 688:1499139a600a

Defect: copies are not reported with default settings (not even as added!). Parameter needCopies removed as there seems to be no reason to condition copies for hi-level api (HgStatus.isCopy() is way down the road)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sat, 27 Jul 2013 20:15:37 +0200
parents 98ff1fb49abe
children
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgStatusCommand.java	Sat Jul 27 18:34:14 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgStatusCommand.java	Sat Jul 27 20:15:37 2013 +0200
@@ -61,13 +61,13 @@
 	public HgStatusCommand defaults() {
 		final Mediator m = mediator;
 		m.needModified = m.needAdded = m.needRemoved = m.needUnknown = m.needMissing = true;
-		m.needCopies = m.needClean = m.needIgnored = false;
+		m.needClean = m.needIgnored = false;
 		return this;
 	}
 	public HgStatusCommand all() {
 		final Mediator m = mediator;
 		m.needModified = m.needAdded = m.needRemoved = m.needUnknown = m.needMissing = true;
-		m.needCopies = m.needClean = m.needIgnored = true;
+		m.needClean = m.needIgnored = true;
 		return this;
 	}
 	
@@ -252,7 +252,6 @@
 		boolean needMissing;
 		boolean needClean;
 		boolean needIgnored;
-		boolean needCopies;
 		HgStatusHandler handler;
 		private ChangelogHelper logHelper;
 		private HgCallbackTargetException failure;
@@ -311,10 +310,8 @@
 			}
 		}
 		public void copied(Path fnameOrigin, Path fnameAdded) {
-			if (needCopies) {
-				// TODO post-1.0 in fact, merged files may report 'copied from' as well, correct status kind thus may differ from Added
-				dispatch(new HgStatus(Added, fnameAdded, fnameOrigin, logHelper));
-			}
+			// TODO post-1.0 in fact, merged files may report 'copied from' as well, correct status kind thus may differ from Added
+			dispatch(new HgStatus(Added, fnameAdded, fnameOrigin, logHelper));
 		}
 		public void missing(Path fname) {
 			if (needMissing) {