diff options
author | Michael Valenta | 2003-01-06 15:22:14 +0000 |
---|---|---|
committer | Michael Valenta | 2003-01-06 15:22:14 +0000 |
commit | 3fdc9bdb325cdf596890492b6320757894731156 (patch) | |
tree | c44aaf047543cf6a14fc2d38d1e36dc0071d70f5 /bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java | |
parent | 0fd448e7940c3d0765401b4957c177407d390752 (diff) | |
download | eclipse.platform.team-3fdc9bdb325cdf596890492b6320757894731156.tar.gz eclipse.platform.team-3fdc9bdb325cdf596890492b6320757894731156.tar.xz eclipse.platform.team-3fdc9bdb325cdf596890492b6320757894731156.zip |
28001: [CVS Sync View] Synchronize with repository seems to be slow.Root_MV_25726_Branch
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java index a5d353d51..61d4c1032 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java @@ -81,12 +81,12 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile { * even if the resource does exists remotely (e.g. created by another party). */ public static RemoteFile getBase(RemoteFolder parent, ICVSFile managed) throws CVSException { - ResourceSyncInfo info = managed.getSyncInfo(); - if ((info == null) || info.isAdded()) { + byte[] syncBytes = managed.getSyncBytes(); + if ((syncBytes == null) || ResourceSyncInfo.isAddition(syncBytes)) { // Either the file is unmanaged or has just been added (i.e. doesn't necessarily have a remote) return null; } - RemoteFile file = new RemoteFile(parent, managed.getSyncInfo()); + RemoteFile file = new RemoteFile(parent, syncBytes); parent.setChildren(new ICVSRemoteResource[] {file}); return file; } @@ -108,14 +108,20 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile { newInfo.setTag(tag); info = newInfo; } - - public RemoteFile(RemoteFolder parent, ResourceSyncInfo info) { - this(parent, Update.STATE_NONE, info); + + public RemoteFile(RemoteFolder parent, byte[] syncBytes) { + this(parent, Update.STATE_NONE, syncBytes); } - public RemoteFile(RemoteFolder parent, int workspaceSyncState, ResourceSyncInfo newInfo) { + public RemoteFile(RemoteFolder parent, int workspaceSyncState, byte[] syncBytes) { this.parent = parent; - info = newInfo; + if (syncBytes == null) + info = null; + else + try { + info = new ResourceSyncInfo(syncBytes); + } catch (CVSException e) { + } setWorkspaceSyncState(workspaceSyncState); } @@ -601,5 +607,17 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile { public boolean isEdited() throws CVSException { return false; } + /** + * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getSyncBytes() + */ + public byte[] getSyncBytes() throws CVSException { + return getSyncInfo().getBytes(); + } + /** + * @see org.eclipse.team.internal.ccvs.core.ICVSFile#setSyncBytes(byte[]) + */ + public void setSyncBytes(byte[] syncBytes) throws CVSException { + setSyncInfo(new ResourceSyncInfo(syncBytes)); + } }
\ No newline at end of file |