Bug 531433 - Replace usage of SubProgressMonitor by SubMonitor

Fixes a regression. beginTask must not be called twice on an
IProgressMonitor instance. SubMonitor.convert() will call beginTask on
the given monitor, so beginTask must not be called before on this
monitor instance. To avoid this, a SubMonitor is created with
subMonitorFor given the required number of ticks.

Change-Id: Icb87740d2a98a0c7b73bfaf6879c767e937759bf
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
index 13fa3e4..0fc27b0 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
@@ -151,8 +151,7 @@
 	
 	public void open(IProgressMonitor monitor, boolean writeAccess) throws CVSException {
 		if (connection != null) throw new IllegalStateException();
-		monitor = Policy.monitorFor(monitor);
-		monitor.beginTask(null, 100);
+		monitor = Policy.subMonitorFor(monitor, 100);
 		boolean opened = false;	
 	
 		try {