Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Bug 279 fix proposal

subclipse
Discussion topic

Back to topic list

Bug 279 fix proposal

Author letenay
Full name Martin Letenay
Date 2005-06-10 01:44:56 PDT
Message Hi All,
 
I've just joined the project and as a start I've took a look at some
reported bugs whether I can fix some.
So I've picked this one:
http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=279 - Dir not decorated
when file is deleted
 
The problem is that when a resource stored in svn is being deleted, to mark
parent directories as dirty,
the resource cannot be deleted directly but rather turned into "phantom".
(See Resoure#deleteResource)
 
The Resource#synchronizing(boolean) is checked wheter it can be turned into
phantom, which futher checks for presence of non-empty getSyncInfo().
And there lies the problem, the syncInfo is always empty.
 
I've tried to trace it down where it might get set and have found that
PersistantResourceVa​riantByteStore#setBy​tes is the only reasonable place
being used.
 
However the SVNWorkspaceSubscriber does not use this
PersistantResourceVa​riantByteStore but rather
SessionResourceVariantByteStore which does not
maintain the resource's syncInfo.
 
When I replaced the remoteSyncStateStore in SVNWorkspaceSubscriber with
PersistantResourceVa​riantByteStore everything starts to work as expected,
when file is deleted, it is converted into phantom and parent resources are
marked as dirty ...
 
However I have absolutely no idea about other potential (negative)
consequences of replacing SessionResourceVariantByteStore with
PersistantResourceVa​riantByteStore,
my knowledge of eclipse platform is very limited here ...
 
Could you guys take a closer look whether such fix makes sense ?
 
Regards,
Martin
 
 
Patch proposal:
 
 
Index:
src/org/tigris/subve​rsion/subclipse/core​/sync/SVNWorkspaceSu​bscriber.java
====================​====================​====================​=======
---
src/org/tigris/subve​rsion/subclipse/core​/sync/SVNWorkspaceSu​bscriber.java
(revision 1367)
+++
src/org/tigris/subve​rsion/subclipse/core​/sync/SVNWorkspaceSu​bscriber.java
(working copy)
@@ -32,6 +32,7 @@
import org.eclipse.core.run​time.IStatus;
import org.eclipse.core.run​time.MultiStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.run​time.QualifiedName;
import org.eclipse.core.run​time.Status;
import org.eclipse.team.cor​e.RepositoryProvider​;
import org.eclipse.team.cor​e.TeamException;
@@ -41,8 +42,8 @@
import org.eclipse.team.cor​e.subscribers.Subscr​iberChangeEvent;
import org.eclipse.team.cor​e.synchronize.SyncIn​fo;
import org.eclipse.team.cor​e.variants.IResource​VariantComparator;
+import org.eclipse.team.cor​e.variants.Persistan​tResourceVariantByte​Store;
import org.eclipse.team.cor​e.variants.ResourceV​ariantByteStore;
-import org.eclipse.team.cor​e.variants.SessionRe​sourceVariantByteSto​re;
import org.eclipse.team.int​ernal.core.TeamPlugi​n;
import org.tigris.subversio​n.subclipse.core.IRe​sourceStateChangeLis​tener;
import org.tigris.subversio​n.subclipse.core.ISV​NLocalResource;
@@ -76,7 +77,7 @@
 
 protected SVNRevisionComparator comparator = new SVNRevisionComparator();
 
- protected ResourceVariantByteStore remoteSyncStateStore = new
SessionResourceVaria​ntByteStore();
+ protected ResourceVariantByteStore remoteSyncStateStore = new
PersistantResourceVa​riantByteStore(new QualifiedName(SVNPro​viderPlugin.ID,
"workspaceSubscriber"));
 
 public SVNWorkspaceSubscriber() {
     SVNProviderPlugin.ad​dResourceStateChange​Listener(this);
Attachments

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

Messages

Show all messages in topic

Bug 279 fix proposal letenay Martin Letenay 2005-06-10 01:44:56 PDT
     Re: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-10 06:47:43 PDT
         RE: [Subclipse-dev] Bug 279 fix proposal letenay Martin Letenay 2005-06-10 06:59:31 PDT
             RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-10 07:26:17 PDT
                 RE: [Subclipse-dev] Bug 279 fix proposal letenay Martin Letenay 2005-06-10 08:16:53 PDT
                     RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-10 08:20:38 PDT
                         RE: [Subclipse-dev] Bug 279 fix proposal letenay Martin Letenay 2005-06-10 08:42:42 PDT
                             RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-10 08:46:05 PDT
                                 Re: [Subclipse-dev] Bug 279 fix proposal Eugene Kuleshov <eu at javatx dot com> Eugene Kuleshov <eu at javatx dot com> 2005-06-10 09:00:19 PDT
                                     RE: [Subclipse-dev] Bug 279 fix proposal letenay Martin Letenay 2005-06-11 12:25:35 PDT
                                         RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-13 06:41:09 PDT
                                             RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-13 11:15:34 PDT
                                                 Re: [Subclipse-dev] Bug 279 fix proposal Eugene Kuleshov <eu at javatx dot com> Eugene Kuleshov <eu at javatx dot com> 2005-06-13 11:50:41 PDT
                                                     Re: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-13 12:03:52 PDT
                                                         RE: [Subclipse-dev] Bug 279 fix proposal letenay Martin Letenay 2005-06-14 02:21:04 PDT
                                                             RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-14 06:22:31 PDT
                             RE: [Subclipse-dev] Bug 279 fix proposal Mark Phippard <MarkP at softlanding dot com> Mark Phippard <MarkP at softlanding dot com> 2005-06-10 08:48:15 PDT
                             Re: [Subclipse-dev] Bug 279 fix proposal Eugene Kuleshov <eu at javatx dot com> Eugene Kuleshov <eu at javatx dot com> 2005-06-10 08:57:17 PDT
Messages per page: