Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: r829 - branches/subclipse-3/core/src/org/tigris/subversion/subclipse/core/sync

subclipse
Discussion topic

Back to topic list

subclipse commit: r829 - branches/subclipse-3/core/src/org/tigris/subversion/subclipse/core/sync

Author pkorros
Full name Panagiotis Korros
Date 2004-08-15 05:44:52 PDT
Message Author: pkorros
Date: Sun Aug 15 07:44:47 2004
New Revision: 829

Modified:
   branches/subclipse-3​/core/src/org/tigris​/subversion/subclips​e/core/sync/SVNWorks​paceSubscriber.java
Log:
SVNWorkspaceSubscriber changed IResourceChangeListener implementation to handle changes without contacting the server.

Modified: branches/subclipse-3​/core/src/org/tigris​/subversion/subclips​e/core/sync/SVNWorks​paceSubscriber.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​branches/subclipse-3​/core/src/org/tigris​/subversion/subclips​e/core/sync/SVNWorks​paceSubscriber.java?​view=diff&rev=82​9&p1=branches/su​bclipse-3/core/src/o​rg/tigris/subversion​/subclipse/core/sync​/SVNWorkspaceSubscri​ber.java&r1=828​&p2=branches/subc​lipse-3/core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNWorkspaceSubscribe​r.java&r2=829
====================​====================​====================​==================
--- branches/subclipse-3​/core/src/org/tigris​/subversion/subclips​e/core/sync/SVNWorks​paceSubscriber.java (original)
+++ branches/subclipse-3​/core/src/org/tigris​/subversion/subclips​e/core/sync/SVNWorks​paceSubscriber.java Sun Aug 15 07:44:47 2004
@@ -345,10 +345,38 @@
     private void internalResourceChan​ged(IResource[] changedResources) {
         for (int i = 0; i < changedResources.length; i++) {
             IResource resource = changedResources[i];
- System.out.println("refresing "+resource);
- refresh(resource, IResource.DEPTH_ZERO );
+ try {
+ if( resource.exists() ) {
+ ISVNLocalResource localResource = SVNWorkspaceRoot.get​SVNResourceFor( resource );
+ ISVNStatus status = localResource.getStatus();
+ StatusInfo localInfo = new StatusInfo(status.ge​tLastChangedRevision​(), status.getTextStatus() );
+ localSyncStateStore.setBytes( resource, localInfo.asBytes() );
+
+ if( remoteSyncStateStore.getBytes( resource ) == null ) {
+ StatusInfo remoteInfo;
+ if( localResource.hasRemote() ) {
+ remoteInfo = new StatusInfo(status.ge​tLastChangedRevision​(), Kind.NORMAL );
+ }
+ else {
+ remoteInfo = new StatusInfo(null, Kind.NONE );
+ }
+ remoteSyncStateStore.setBytes( resource, remoteInfo.asBytes() );
+ }
+ }
+ else {
+ if( remoteSyncStateStore.getBytes( resource ) == null ) {
+ localSyncStateStore.​deleteBytes( resource );
+ }
+ else {
+ StatusInfo localInfo = new StatusInfo(null, Kind.NONE );
+ localSyncStateStore.setBytes( resource, localInfo.asBytes() );
+ }
+ }
+ } catch (TeamException e) {
+ e.printStackTrace();
+ }
         }
- fireTeamResourceChan​ge(SubscriberChangeE​vent.asSyncChangedDe​ltas(this, changedResources));
+ fireTeamResourceChan​ge(SubscriberChangeE​vent.asSyncChangedDe​ltas(this, changedResources));
     }
 
     /* (non-Javadoc)

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@subc​lipse.tigris.org
For additional commands, e-mail: cvs-help at subclipse dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

subclipse commit: r829 - branches/subclipse-3/core/src/org/tigris/subversion/subclipse/core/sync pkorros Panagiotis Korros 2004-08-15 05:44:52 PDT
Messages per page: