Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-25 20:41:55 +0000
committerMichael Valenta2003-09-25 20:41:55 +0000
commitd92da3f9419dc829541b898d6684bc562beb3e66 (patch)
treea3d9c2092a4a3d666372db47f688e4a5b9d56bf4
parent372f6ea10b5c77340711706c1c18898db4e2b678 (diff)
downloadeclipse.platform.team-d92da3f9419dc829541b898d6684bc562beb3e66.tar.gz
eclipse.platform.team-d92da3f9419dc829541b898d6684bc562beb3e66.tar.xz
eclipse.platform.team-d92da3f9419dc829541b898d6684bc562beb3e66.zip
43510: [CVS UI] Code to mark noop commits was not ported
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java8
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java22
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java3
3 files changed, 24 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
index 181437a03..1d42ac5c3 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
@@ -92,7 +92,7 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
}
/*
- * @see ICVSFile#setTimeStamp(String)
+ * @see ICVSFile#setTimeStamp(Date)
*/
public void setTimeStamp(Date date) throws CVSException {
long time;
@@ -102,9 +102,9 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
time = date.getTime();
}
try {
- getIFile().setLocalTimeStamp(time);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
+ EclipseSynchronizer.getInstance().setTimeStamp(getIFile(), time);
+ } finally {
+ handleModification(false /* not an addition */);
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
index 84370b5fa..a9465ad4c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
@@ -1467,10 +1467,26 @@ public class EclipseSynchronizer implements IFlushOperation {
* @return
*/
public boolean isWithinActiveOperationScope(IResource resource) {
- // TODO Auto-generated method stub
- return false;
+ return resourceLock.isWithinActiveOperationScope(resource);
}
-
+ public void setTimeStamp(IFile file, long time) throws CVSException {
+ try {
+ beginBatching(file);
+ try {
+ beginOperation();
+ try {
+ file.setLocalTimeStamp(time);
+ } catch (CoreException e) {
+ throw CVSException.wrapException(e);
+ }
+ resourceChanged(file);
+ } finally {
+ endOperation();
+ }
+ } finally {
+ endBatching(file, null);
+ }
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
index 447aa6f45..9e33acfd0 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
@@ -19,7 +19,6 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -263,7 +262,7 @@ public class ReentrantLock {
info.flush(monitor);
}
- public boolean isWithinActiveOperationScope(IFile resource) {
+ public boolean isWithinActiveOperationScope(IResource resource) {
synchronized (infos) {
return getThreadInfo(resource) != null;
}

Back to the top