Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-04-09 10:56:16 -0400
committerJean Michel-Lemieux2002-04-09 10:56:16 -0400
commitb07087cd7df198c7260da9a791dd29d1d70d73c8 (patch)
treeb6b47c64f83d6efb7824934b1464e9671490b9d9
parent951cad94feeceb8fd19ec40c31a3505187e257b0 (diff)
downloadeclipse.platform.team-b07087cd7df198c7260da9a791dd29d1d70d73c8.tar.gz
eclipse.platform.team-b07087cd7df198c7260da9a791dd29d1d70d73c8.tar.xz
eclipse.platform.team-b07087cd7df198c7260da9a791dd29d1d70d73c8.zip
Fixed my f-up in sendModified.
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java7
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java11
2 files changed, 12 insertions, 6 deletions
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 7627a17bc..d7a48f3ae 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
@@ -34,6 +34,7 @@ import org.eclipse.team.internal.ccvs.core.streams.CRLFtoLFInputStream;
import org.eclipse.team.internal.ccvs.core.streams.LFtoCRLFInputStream;
import org.eclipse.team.internal.ccvs.core.streams.ProgressMonitorInputStream;
import org.eclipse.team.internal.ccvs.core.streams.SizeConstrainedInputStream;
+import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
import org.eclipse.team.internal.ccvs.core.util.Util;
@@ -519,10 +520,14 @@ public class Session {
public void sendModified(ICVSFile file, boolean isBinary, IProgressMonitor monitor)
throws CVSException {
- connection.writeLine("Modified " + file.getName()); //$NON-NLS-1$
+ String filename = file.getName();
+ connection.writeLine("Modified " + filename); //$NON-NLS-1$
ResourceSyncInfo info = file.getSyncInfo();
if (info != null) {
connection.writeLine(info.getPermissions());
+ } else {
+ // for new resources send the default permissions
+ connection.writeLine(new MutableResourceSyncInfo(filename, null /*new revision*/).getPermissions());
}
sendFile(file, isBinary, monitor);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
index 3ed068668..f93ea10a4 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
@@ -352,14 +352,15 @@ public class ResourceSyncInfo {
* @param version the version to set
*/
protected void setRevision(String revision) {
- if(revision.startsWith(DELETED_PREFIX)) {
+ if(revision==null || revision.equals(ADDED_REVISION)) {
+ this.revision = ADDED_REVISION;
+ timeStamp = null;
+ syncType = TYPE_REGULAR;
+ isDeleted = false;
+ } else if(revision.startsWith(DELETED_PREFIX)) {
this.revision = revision.substring(DELETED_PREFIX.length());
isDeleted = true;
} else {
- if(revision.equals(ADDED_REVISION)) {
- timeStamp = null;
- syncType = TYPE_REGULAR;
- }
this.revision = revision;
isDeleted = false;
}

Back to the top