Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r3758 - trunk/subclipse: org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/client org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/resources org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/status org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/sync org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/actions org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/operations

subclipse
Discussion topic

Back to topic list

svn commit: r3758 - trunk/subclipse: org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/client org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/resources org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/status org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/sync org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/actions org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/operations

Author selsemore
Full name Stephen Elsemore
Date 2008-03-19 10:15:23 PDT
Message Author: selsemore
Date: 2008-03-19 10:15:22-0700
New Revision: 3758

Modified:
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/client​/OperationManager.ja​va
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFile.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFolder.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseResource.jav​a
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFile.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFolder.java​
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/ResourceStatus.j​ava
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/SVNWorkspaceRoot​.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/status​/StatusCacheManager.​java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNStatusSyncInfo.jav​a
   trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNWorkspaceSubscribe​r.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Ge​nerateDiffFileAction​.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Re​vertAction.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/SV​NPropertyAction.java​
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Wo​rkspaceAction.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/operations​/SVNOperation.java

Log:
Remove all cases of ambiguous filesystem->workspace mapping in subclipse.

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/client​/OperationManager.ja​va
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/client/Operati​onManager.java?view=​diff&rev=3758​&p1=trunk/subclipse​/org.tigris.subversi​on.subclipse.core/sr​c/org/tigris/subvers​ion/subclipse/core/c​lient/OperationManag​er.java&p2=trunk​/subclipse/org.tigri​s.subversion.subclip​se.core/src/org/tigr​is/subversion/subcli​pse/core/client/Oper​ationManager.java​&r1=3757&r2=375​8
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/client​/OperationManager.ja​va (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/client​/OperationManager.ja​va 2008-03-19 10:15:22-0700
@@ -11,6 +11,7 @@
 package org.tigris.subversio​n.subclipse.core.cli​ent;
 
 import java.io.File;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.Set;
@@ -141,46 +142,47 @@
         if (kind == SVNNodeKind.UNKNOWN) { // delete, revert
             IPath pathEntries = pathEclipse.removeLa​stSegments(1).append​(
                     SVNProviderPlugin.ge​tPlugin().getAdminDi​rectoryName());
- IResource entries = SVNWorkspaceRoot.get​ResourceFor(pathEntr​ies);
- if (entries != null) //probably the pathEclipse was project itself
- {
- changedResources.add(entries);
- }
+ changedResources.add​All(Arrays.asList(SV​NWorkspaceRoot.getRe​sourcesFor(pathEntri​es)));
             
             if (path.isDirectory()) {
- IResource resource = SVNWorkspaceRoot.get​ResourceFor(pathEcli​pse);
- if (resource != null && resource.getType() != IResource.ROOT) {
- IResource svnDir = ((IContainer) resource).getFolder(new Path(
- SVNProviderPlugin.ge​tPlugin().getAdminDi​rectoryName()));
- changedResources.add(svnDir);
- }
+ IResource[] resources = SVNWorkspaceRoot.get​ResourcesFor(pathEcl​ipse);
+ for (int i = 0; i < resources.length; i++) {
+ IResource resource = resources[i];
+ if (resource.getType() != IResource.ROOT) {
+ IResource svnDir = ((IContainer) resource).getFolder(new Path(
+ SVNProviderPlugin.ge​tPlugin().getAdminDi​rectoryName()));
+ changedResources.add(svnDir);
+ }
+ }
             }
         }
         else
         {
- IResource resource = null;
             IResource svnDir = null;
             if (kind == SVNNodeKind.DIR) {
                 // when the resource is a directory, two .svn directories can
                 // potentially
                 // be modified
- resource = SVNWorkspaceRoot.get​ResourceFor(pathEcli​pse);
- if (resource != null && resource.getType() != IResource.ROOT) {
- if (resource.getProject() != resource) {
- // if resource is a project. We can't refresh ../.svn
- svnDir = resource.getParent().getFolder(
- new Path(SVNProviderPlug​in.getPlugin().getAd​minDirectoryName()))​;
- changedResources.add(svnDir);
+ IResource[] resources = SVNWorkspaceRoot.get​ResourcesFor(pathEcl​ipse);
+ for (int i = 0; i < resources.length; i++) {
+ IResource resource = resources[i];
+ if (resource.getType() != IResource.ROOT) {
+ if (resource.getProject() != resource) {
+ // if resource is a project. We can't refresh ../.svn
+ svnDir = resource.getParent().getFolder(
+ new Path(SVNProviderPlug​in.getPlugin().getAd​minDirectoryName()))​;
+ changedResources.add(svnDir);
+ }
+ svnDir = ((IContainer) resource).getFolder(new Path(
+ SVNProviderPlugin.ge​tPlugin().getAdminDi​rectoryName()));
+ changedResources.add(svnDir);
                     }
- svnDir = ((IContainer) resource).getFolder(new Path(
- SVNProviderPlugin.ge​tPlugin().getAdminDi​rectoryName()));
- changedResources.add(svnDir);
                 }
             } else if (kind == SVNNodeKind.FILE) {
- resource = SVNWorkspaceRoot.get​ResourceFor(pathEcli​pse);
+ IResource[] resources = SVNWorkspaceRoot.get​ResourcesFor(pathEcl​ipse);
 
- if (resource != null) {
- svnDir = resource.getParent().getFolder(
+ for (int i = 0; i < resources.length; i++) {
+ svnDir = resources[i].getPare​nt().getFolder(
                             new Path(SVNProviderPlug​in.getPlugin().getAd​minDirectoryName()))​;
                     changedResources.add(svnDir);
                 }

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFile.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/Base​File.java?view=diff​&rev=3758&p1=​trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFile.java​&p2=trunk/subclipse​/org.tigris.subversi​on.subclipse.core/sr​c/org/tigris/subvers​ion/subclipse/core/r​esources/BaseFile.ja​va&r1=3757&r​2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFile.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFile.java 2008-03-19 10:15:22-0700
@@ -10,6 +10,7 @@
  ********************​********************​********************​******************/
 package org.tigris.subversio​n.subclipse.core.res​ources;
 
+import org.eclipse.core.res​ources.IResource;
 import org.eclipse.core.res​ources.IStorage;
 import org.eclipse.core.run​time.IProgressMonito​r;
 import org.eclipse.team.cor​e.TeamException;
@@ -29,9 +30,9 @@
      * Constructor
      * @param localResourceStatus
      */
- public BaseFile(LocalResourceStatus localResourceStatus)
+ public BaseFile(IResource resource, LocalResourceStatus localResourceStatus)
     {
- super(localResourceStatus);
+ super(resource, localResourceStatus);
     }
 
     /**
@@ -39,8 +40,8 @@
      * @param localResourceStatus
      * @param charset
      */
- public BaseFile(LocalResourceStatus localResourceStatus, String charset) {
- super(localResourceStatus, charset);
+ public BaseFile(IResource resource, LocalResourceStatus localResourceStatus, String charset) {
+ super(resource, localResourceStatus, charset);
     }
 
     /* (non-Javadoc)

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFolder.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/Base​Folder.java?view=dif​f&rev=3758&p​1=trunk/subclipse/or​g.tigris.subversion.​subclipse.core/src/o​rg/tigris/subversion​/subclipse/core/reso​urces/BaseFolder.jav​a&p2=trunk/subcl​ipse/org.tigris.subv​ersion.subclipse.cor​e/src/org/tigris/sub​version/subclipse/co​re/resources/BaseFol​der.java&r1=3757​&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFolder.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseFolder.java 2008-03-19 10:15:22-0700
@@ -13,6 +13,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.core.res​ources.IContainer;
+import org.eclipse.core.res​ources.IResource;
 import org.eclipse.core.res​ources.IStorage;
 import org.eclipse.core.run​time.CoreException;
 import org.eclipse.core.run​time.IProgressMonito​r;
@@ -36,9 +38,9 @@
      * Constructor
      * @param localResourceStatus
      */
- public BaseFolder(LocalResourceStatus localResourceStatus)
+ public BaseFolder(IResource resource, LocalResourceStatus localResourceStatus)
     {
- super(localResourceStatus);
+ super(resource, localResourceStatus);
     }
     
     /* (non-Javadoc)
@@ -108,7 +110,7 @@
         progress.beginTask(P​olicy.bind("RemoteFo​lder.getMembers"), 100); //$NON-NLS-1$
         
         try {
- GetStatusCommand c = new GetStatusCommand(loc​alResourceStatus.get​Repository(), localResourceStatus.​getResource(), false, true);
+ GetStatusCommand c = new GetStatusCommand(loc​alResourceStatus.get​Repository(), resource, false, true);
             c.run(monitor);
             LocalResourceStatus[] statuses = c.getLocalResourceStatuses();
             List baseChildren = new ArrayList(statuses.length);
@@ -131,7 +133,7 @@
                 // The folders itself is not its own child, all direct children are
                 if (statuses[i].getUrlString() != null && !statuses[i].getUrlS​tring().equals(local​ResourceStatus.getUr​lString()))
                 {
- baseChildren.add(Bas​eResource.from(statu​ses[i]));
+ baseChildren.add(Bas​eResource.from(SVNWo​rkspaceRoot.getResou​rceFor(resource, statuses[i]), statuses[i]));
                 }
             }
             return (ISVNRemoteResource[]) baseChildren.toArray(new ISVNRemoteResource[b​aseChildren.size()])​;

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseResource.jav​a
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/Base​Resource.java?view=d​iff&rev=3758​&p1=trunk/subclipse/​org.tigris.subversio​n.subclipse.core/src​/org/tigris/subversi​on/subclipse/core/re​sources/BaseResource​.java&p2=trunk/s​ubclipse/org.tigris.​subversion.subclipse​.core/src/org/tigris​/subversion/subclips​e/core/resources/Bas​eResource.java&r​1=3757&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseResource.jav​a (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/BaseResource.jav​a 2008-03-19 10:15:22-0700
@@ -21,7 +21,6 @@
 import org.tigris.subversio​n.subclipse.core.ISV​NRemoteFolder;
 import org.tigris.subversio​n.subclipse.core.ISV​NRemoteResource;
 import org.tigris.subversio​n.subclipse.core.ISV​NRepositoryLocation;​
-import org.tigris.subversio​n.subclipse.core.SVN​Exception;
 import org.tigris.subversio​n.subclipse.core.uti​l.Assert;
 import org.tigris.subversio​n.svnclientadapter.I​SVNLogMessage;
 import org.tigris.subversio​n.svnclientadapter.S​VNClientException;
@@ -41,15 +40,18 @@
 
     private String charset = null;
     protected LocalResourceStatus localResourceStatus;
+ protected IResource resource;
 
     /**
      * Constructor for BaseResource.
      * @param localResourceStatus
      */
- public BaseResource(LocalRe​sourceStatus localResourceStatus)
+ public BaseResource(IResource resource, LocalResourceStatus localResourceStatus)
     {
+ Assert.isNotNull(resource);
         Assert.isNotNull(loc​alResourceStatus);
- this.localResourceStatus = localResourceStatus;
+ this.localResourceStatus = localResourceStatus;
+ this.resource = resource;
     }
 
     /**
@@ -57,11 +59,13 @@
      * @param localResourceStatus
      * @param charset
      */
- public BaseResource(LocalRe​sourceStatus localResourceStatus, String charset)
+ public BaseResource(IResource resource, LocalResourceStatus localResourceStatus, String charset)
     {
+ Assert.isNotNull(resource);
         Assert.isNotNull(loc​alResourceStatus);
         this.localResourceStatus = localResourceStatus;
         this.charset = charset;
+ this.resource = resource;
     }
 
     /**
@@ -69,15 +73,15 @@
      * @param localResourceStatus
      * @return newly constructed BaseFile or BaseFolder instance
      */
- public static BaseResource from(LocalResourceStatus localResourceStatus)
+ public static BaseResource from(IResource resource, LocalResourceStatus localResourceStatus)
     {
         if (SVNNodeKind.FILE.eq​uals(localResourceSt​atus.getNodeKind()))​
         {
- return new BaseFile(localResourceStatus);
+ return new BaseFile(resource, localResourceStatus);
         }
         else
         {
- return new BaseFolder(localReso​urceStatus);
+ return new BaseFolder(resource, localResourceStatus);
         }
     }
     
@@ -240,10 +244,6 @@
      * @see org.tigris.subversio​n.subclipse.core.ISV​NResource#getResourc​e()
      */
     public IResource getResource() {
- try {
- return localResourceStatus.​getResource();
- } catch (SVNException e) {
- return null;
- }
+ return resource;
     }
 }

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFile.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/Loca​lFile.java?view=diff​&rev=3758&p1​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.core/src/or​g/tigris/subversion/​subclipse/core/resou​rces/LocalFile.java​&p2=trunk/subclip​se/org.tigris.subver​sion.subclipse.core/​src/org/tigris/subve​rsion/subclipse/core​/resources/LocalFile​.java&r1=3757​&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFile.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFile.java 2008-03-19 10:15:22-0700
@@ -40,7 +40,7 @@
         if (!hasRemote()) {// no base if no remote
             return null;
         }
- return new BaseFile(getStatus());
+ return new BaseFile(resource, getStatus());
     }
     
     /* (non-Javadoc)

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFolder.java​
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/Loca​lFolder.java?view=di​ff&rev=3758&​p1=trunk/subclipse/o​rg.tigris.subversion​.subclipse.core/src/​org/tigris/subversio​n/subclipse/core/res​ources/LocalFolder.j​ava&p2=trunk/sub​clipse/org.tigris.su​bversion.subclipse.c​ore/src/org/tigris/s​ubversion/subclipse/​core/resources/Local​Folder.java&r1=3​757&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFolder.java​ (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/LocalFolder.java​ 2008-03-19 10:15:22-0700
@@ -16,6 +16,7 @@
 import org.eclipse.core.res​ources.IContainer;
 import org.eclipse.core.res​ources.IFolder;
 import org.eclipse.core.res​ources.IResource;
+import org.eclipse.core.res​ources.IWorkspaceRoo​t;
 import org.eclipse.core.run​time.CoreException;
 import org.eclipse.core.run​time.IProgressMonito​r;
 import org.eclipse.core.run​time.NullProgressMon​itor;
@@ -56,7 +57,7 @@
         if (!isManaged()) {// no base if no remote
             return null;
         }
- return new BaseFolder(getStatus());
+ return new BaseFolder(resource, getStatus());
     }
 
     /* (non-Javadoc)
@@ -280,6 +281,10 @@
         {
             return LocalResourceStatus.NONE;
         }
+ if (getIResource() instanceof IWorkspaceRoot)
+ {
+ return LocalResourceStatus.NONE;
+ }
         return super.getStatus();
     }
 

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/ResourceStatus.j​ava
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/Reso​urceStatus.java?view​=diff&rev=3758​&p1=trunk/subclips​e/org.tigris.subvers​ion.subclipse.core/s​rc/org/tigris/subver​sion/subclipse/core/​resources/ResourceSt​atus.java&p2=tru​nk/subclipse/org.tig​ris.subversion.subcl​ipse.core/src/org/ti​gris/subversion/subc​lipse/core/resources​/ResourceStatus.java​&r1=3757&r2=​3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/ResourceStatus.j​ava (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/ResourceStatus.j​ava 2008-03-19 10:15:22-0700
@@ -19,14 +19,11 @@
 import java.net.MalformedURLException;
 import java.util.Date;
 
-import org.eclipse.core.res​ources.IResource;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.team.cor​e.RepositoryProvider​;
 import org.tigris.subversio​n.subclipse.core.ISV​NRepositoryLocation;​
 import org.tigris.subversio​n.subclipse.core.SVN​Exception;
 import org.tigris.subversio​n.subclipse.core.SVN​ProviderPlugin;
-import org.tigris.subversio​n.subclipse.core.SVN​TeamProvider;
 import org.tigris.subversio​n.svnclientadapter.I​SVNStatus;
 import org.tigris.subversio​n.svnclientadapter.S​VNNodeKind;
 import org.tigris.subversio​n.svnclientadapter.S​VNRevision;
@@ -55,8 +52,6 @@
     protected static final int FORMAT_VERSION_2 = 2;
     protected static final int FORMAT_VERSION_3 = 3;
 
- protected transient IResource resource;
-
     protected String url;
     protected File file; // file (absolute path) -- not stored in bytes in this class. Subclasses may store it ...
     protected long lastChangedRevision;
@@ -189,17 +184,11 @@
                 return null;
             }
         }
- else
+ else if (file != null)
         {
- try {
- SVNTeamProvider teamProvider = (SVNTeamProvider)Rep​ositoryProvider.getP​rovider(getResource(​).getProject(), SVNProviderPlugin.getTypeId());
- return teamProvider.getSVNW​orkspaceRoot().getRe​pository();
- } catch (SVNException e) {
- // an exception is thrown when resource is not managed
- SVNProviderPlugin.log(e);
- return null;
- }
+ return SVNWorkspaceRoot.get​RepositoryFor(new Path(file.getAbsolutePath()));
         }
+ return null;
     }
 
     /* (non-Javadoc)
@@ -412,21 +401,6 @@
     }
     
     /**
- * Gets the resource this status is corresponding to.
- * Use either ResourceInfo.getType() or getNodeKind() to determine the proper kind of resource.
- * The resource does not need to exists (yet)
- * @return IResource
- * @throws SVNException
- */
- public synchronized IResource getResource() throws SVNException
- {
- if (resource == null) {
- return SVNWorkspaceRoot.get​ResourceFor(this);
- }
- return resource;
- }
-
- /**
      * Performance optimized ByteArrayOutputStream for storing status data.
         * This is one-purpose specialized stream without need for synchronization
         * or generic bounds checking

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/SVNWorkspaceRoot​.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/resources/SVNW​orkspaceRoot.java?vi​ew=diff&rev=3758​&p1=trunk/subcli​pse/org.tigris.subve​rsion.subclipse.core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/SVNWorks​paceRoot.java&p2​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.core/src/or​g/tigris/subversion/​subclipse/core/resou​rces/SVNWorkspaceRoo​t.java&r1=3757​&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/SVNWorkspaceRoot​.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/resour​ces/SVNWorkspaceRoot​.java 2008-03-19 10:15:22-0700
@@ -10,15 +10,14 @@
  ********************​********************​********************​******************/
 package org.tigris.subversio​n.subclipse.core.res​ources;
 
-import java.io.File;
 import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Set;
 
 import javax.xml.parsers.Do​cumentBuilder;
 import javax.xml.parsers.Do​cumentBuilderFactory​;
 
-import org.eclipse.core.int​ernal.localstore.Fil​eSystemResourceManag​er;
 import org.eclipse.core.res​ources.IContainer;
 import org.eclipse.core.res​ources.IFile;
 import org.eclipse.core.res​ources.IProject;
@@ -29,7 +28,6 @@
 import org.eclipse.core.run​time.IProgressMonito​r;
 import org.eclipse.core.run​time.IStatus;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.core.run​time.Platform;
 import org.eclipse.team.cor​e.RepositoryProvider​;
 import org.eclipse.team.cor​e.TeamException;
 import org.tigris.subversio​n.subclipse.core.ISV​NLocalFile;
@@ -42,7 +40,7 @@
 import org.tigris.subversio​n.subclipse.core.SVN​Exception;
 import org.tigris.subversio​n.subclipse.core.SVN​ProviderPlugin;
 import org.tigris.subversio​n.subclipse.core.SVN​Status;
-import org.tigris.subversio​n.subclipse.core.cli​ent.IConsoleListener​;
+import org.tigris.subversio​n.subclipse.core.SVN​TeamProvider;
 import org.tigris.subversio​n.subclipse.core.cli​ent.PeekStatusComman​d;
 import org.tigris.subversio​n.subclipse.core.com​mands.CheckoutComman​d;
 import org.tigris.subversio​n.subclipse.core.com​mands.ShareProjectCo​mmand;
@@ -50,7 +48,6 @@
 import org.tigris.subversio​n.svnclientadapter.I​SVNInfo;
 import org.tigris.subversio​n.svnclientadapter.I​SVNStatus;
 import org.tigris.subversio​n.svnclientadapter.S​VNClientException;
-import org.tigris.subversio​n.svnclientadapter.S​VNNodeKind;
 import org.tigris.subversio​n.svnclientadapter.S​VNRevision;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -83,6 +80,9 @@
     }
 
     public static boolean isManagedBySubclipse(IProject project) {
+ if (project == null)
+ return false;
+
         synchronized (sharedProjects) {
             if (sharedProjects.cont​ains(project))
                 return true;
@@ -137,7 +137,7 @@
             client.getNotificati​onHandler().enableLo​g();
         }
     }
-
+
     /**
      * @param name
      * @return
@@ -212,32 +212,6 @@
         RepositoryProvider.map(project, SVNProviderPlugin.getTypeId());
     }
         
-
- /**
- * Returns a resource path to the given local location. Returns null if
- * it is not under a project's location.
- * @see FileSystemResourceMa​nager#pathForLocatio​n(org.eclipse.core.r​untime.IPath)
- */
- public static IPath pathForLocation(IPath location) {
- if (Platform.getLocatio​n().equals(location)​)
- return Path.ROOT;
- IProject[] projects = ResourcesPlugin.getW​orkspace().getRoot()​.getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
-
- // Map only to projects, which are managed by subclipse.
- if (!isManagedBySubclip​se(project))
- continue;
-
- IPath projectLocation = project.getLocation();
- if (projectLocation != null && projectLocation.isPr​efixOf(location)) {
- int segmentsToRemove = projectLocation.segmentCount();
- return project.getFullPath(​).append(location.re​moveFirstSegments(se​gmentsToRemove));
- }
- }
- return null;
- }
-
     /**
      * get the SVNLocalFolder for the given resource
      */
@@ -382,16 +356,6 @@
             return isSvnMetaResource(parent);
         }
     }
-
- /**
- * Return the resource type (FILE, FOLDER, PROJECT) of the resource specified by an absolute filesystem path
- * @param absolutePath a filesystem absolute path
- * @return IResource.FILE, IResource.FOLDER, IResource.PROJECT or IResource.ROOT or 0 if it could not be determined
- */
- public static int getResourceType(String absolutePath)
- {
- return getResourceType(path​ForLocation(new Path(absolutePath)));
- }
 
     /**
      * Return the resource type (FILE, FOLDER, PROJECT) of the resource specified by an absolute filesystem path
@@ -405,84 +369,22 @@
         return r == null ? 0 : r.getType();
     }
     
- /**
- * Gets the resource to which the <code>status</code> is corresponding to.
- * Use either ResourceInfo.getType() or getNodeKind() to determine the proper kind of resource.
- * The resource does not need to exists (yet)
- * @return IResource
- */
- public static IResource getResourceFor(ResourceStatus status) throws SVNException
- {
- if (status.getFile() == null) return null;
- IWorkspaceRoot root = ResourcesPlugin.getW​orkspace().getRoot()​;
- IPath resourcePath = pathForLocation(stat​us.getIPath());
- if (resourcePath == null)
- {
- return null;
-// if(status.getFile() != null && status.getFile().get​Name().equals(".meta​data")) //$NON-NLS-1$
-// return null;
-// if (!nullResourceLogged) {
-// String errorMsg = Policy.bind("SVNWork​spaceRoot.nullResour​ce", status.getPathString());
-// IConsoleListener console = SVNProviderPlugin.ge​tPlugin().getConsole​Listener();
-// if (console != null) {
-// console.logError(errorMsg);
-// console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​2"));
-// console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​3"));
-// console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​4"));
-// console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​5"));
-// console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​6"));
-// }
-// nullResourceLogged = true;
-// throw new SVNException(errorMsg);
-// }
-// throw new SVNException("");
- }
- int kind = getResourceType(resourcePath);
-
- if (kind == IResource.FILE)
- {
- return root.getFile(resourcePath);
- }
- else if(kind == IResource.FOLDER)
- {
- return root.getFolder(resourcePath);
- }
- else if (kind == IResource.PROJECT)
- {
- return root.getProject(reso​urcePath.segment(0))​;
- }
- else if (kind == IResource.ROOT)
- {
- return root;
- }
- else if (status.getNodeKind() == SVNNodeKind.FILE)
- {
- return root.getFile(resourcePath);
- }
- else
- {
- if (resourcePath.isRoot())
- {
- return root;
- }
- else if (resourcePath.segmentCount() == 1)
- {
- return root.getProject(reso​urcePath.segment(0))​;
- }
- }
-// if (this.getNodeKind() == SVNNodeKind.UNKNOWN) {
-// File file = this.getPath().toFile();
-// if (file.isDirectory())
-// resource = workspaceRoot.getCon​tainerForLocation(pa​thEclipse);
-// else
-// resource = workspaceRoot.getFil​eForLocation(pathEcl​ipse);
-// }
-
- return root.getFolder(resourcePath);
- }
+ /**
+ * Returns workspace resource for the given local file system <code>location​</code>
+ * and which is a child of the given <code>parent</code> resource. Returns
+ * <code>parent</code> if parent's file system location equals to the given
+ * <code>location​</code>. Returns <code>null</code> if <code>parent</code> is the
+ * workspace root.
+ *
+ * Resource does not have to exist in the workspace in which case resource
+ * type will be determined by the type of the local filesystem object.
+ */
+ public static IResource getResourceFor(IResource parent, IPath location) {
+ if (parent == null || location == null) {
+ return null;
+ }
 
- public static IResource getResourceFor(IContainer parent, ISVNStatus status) throws SVNException {
- if (parent == null || status == null || status.getFile() == null) {
+ if (parent instanceof IWorkspaceRoot) {
             return null;
         }
 
@@ -490,14 +392,13 @@
             return null;
         }
 
- IPath location = new Path(status.getFile(​).getAbsolutePath())​;
         if (!parent.getLocation​().isPrefixOf(locati​on)) {
             return null;
         }
 
         int segmentsToRemove = parent.getLocation()​.segmentCount();
         IPath fullPath = parent.getFullPath()​.append(location.rem​oveFirstSegments(seg​mentsToRemove));
-
+
         IWorkspaceRoot root = ResourcesPlugin.getW​orkspace().getRoot()​;
 
         IResource resource = root.findMember(fullPath);
@@ -506,132 +407,69 @@
             return resource;
         }
 
+ if (parent instanceof IFile) {
+ return null;
+ }
+
         if (fullPath.isRoot()) {
             return root;
         } else if (fullPath.segmentCount() == 1) {
             return root.getProject(full​Path.segment(0));
         }
 
- if (status.getFile().is​Directory()) {
+ if (location.toFile().i​sDirectory()) {
             return root.getFolder(fullPath);
         }
 
         return root.getFile(fullPath);
     }
 
+ public static IResource getResourceFor(IResource parent, ISVNStatus status) {
+ if (status == null || status.getFile() == null) {
+ return null;
+ }
+ return getResourceFor(parent, new Path(status.getFile(​).getAbsolutePath())​);
+ }
+
     /**
- * Gets the resource to which the <code>path</code> is corresponding to.
- * The resource does not need to exists (yet)
- * @return IResource
+ * Gets the resources to which the local filesystem <code>location​</code> is corresponding to.
+ * The resources do not need to exists (yet)
+ * @return IResource[]
+ * @throws SVNException
      */
- public static IResource getResourceFor(IPath path)
- {
+ public static IResource[] getResourcesFor(IPath location) {
+ ArrayList resources = new ArrayList();
         IWorkspaceRoot root = ResourcesPlugin.getW​orkspace().getRoot()​;
- IPath resourcePath = pathForLocation(path​.makeAbsolute());
-
- if (resourcePath == null)
- return null;
-
- int kind = getResourceType(resourcePath);
-
- if (kind == IResource.FILE)
- {
- return root.getFile(resourcePath);
- }
- else if(kind == IResource.FOLDER)
- {
- return root.getFolder(resourcePath);
- }
- else if ((kind == IResource.PROJECT) || (resourcePath.segmentCount() == 1))
- {
- return root.getProject(reso​urcePath.segment(0))​;
- }
- else if ((kind == IResource.ROOT) || (resourcePath.isRoot()))
- {
- return root;
+ IProject[] projects = root.getProjects();
+ for (int i = 0; i < projects.length; i++) {
+ IResource resource = getResourceFor(projects[i], location);
+ if (resource != null) {
+ resources.add(resource);
+ }
         }
-
- File file = path.toFile();
- if (file.isFile())
- return root.getFile(resourcePath);
-
- return root.getFolder(resourcePath);
+ return (IResource[]) resources.toArray(new IResource[resources.size()]);
     }
 
     /**
- * Gets the resource to which the <code>status</code> is corresponding to.
- * Use either ResourceInfo.getType() or getNodeKind() to determine the proper kind of resource.
- * The resource does not need to exists (yet)
- * @return IResource
+ * Gets the repository which the local filesystem <code>location​</code> belongs to.
      */
- public static IResource getResourceFor(ISVNStatus status) throws SVNException
- {
- if (status.getPath() == null) return null;
+ public static ISVNRepositoryLocation getRepositoryFor(IPath location) {
         IWorkspaceRoot root = ResourcesPlugin.getW​orkspace().getRoot()​;
- IPath resourcePath = pathForLocation(new Path(status.getPath()));
- if (resourcePath == null)
- {
- if(status.getFile() != null && status.getFile().get​Name().equals(".meta​data")) //$NON-NLS-1$
- return null;
- if (!nullResourceLogged) {
- String errorMsg = Policy.bind("SVNWork​spaceRoot.nullResour​ce", status.getPath());
- IConsoleListener console = SVNProviderPlugin.ge​tPlugin().getConsole​Listener();
- if (console != null) {
- console.logError(Pol​icy.bind(errorMsg));​
- console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​2"));
- console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​3"));
- console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​4"));
- console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​5"));
- console.logError(Pol​icy.bind("SVNWorkspa​ceRoot.nullResource.​6"));
- }
- nullResourceLogged = true;
- throw new SVNException(errorMsg);
- }
- throw new SVNException("");
- }
- int kind = getResourceType(resourcePath);
-
- if (kind == IResource.FILE)
- {
- return root.getFile(resourcePath);
- }
- else if(kind == IResource.FOLDER)
- {
- return root.getFolder(resourcePath);
- }
- else if (kind == IResource.PROJECT)
- {
- return root.getProject(reso​urcePath.segment(0))​;
- }
- else if (kind == IResource.ROOT)
- {
- return root;
- }
- else if (status.getNodeKind() == SVNNodeKind.FILE)
- {
- return root.getFile(resourcePath);
- }
- else
- {
- if (resourcePath.isRoot())
- {
- return root;
- }
- else if (resourcePath.segmentCount() == 1)
- {
- return root.getProject(reso​urcePath.segment(0))​;
+ IProject[] projects = root.getProjects();
+ for (int i = 0; i < projects.length; i++) {
+ IProject project = projects[i];
+ if (project.getLocation​().isPrefixOf(locati​on) && SVNWorkspaceRoot.isM​anagedBySubclipse(pr​oject)) {
+ try {
+ SVNTeamProvider teamProvider = (SVNTeamProvider)Rep​ositoryProvider.getP​rovider(project, SVNProviderPlugin.getTypeId());
+ return teamProvider.getSVNW​orkspaceRoot().getRe​pository();
+ } catch (SVNException e) {
+ // an exception is thrown when resource is not managed
+ SVNProviderPlugin.log(e);
+ return null;
+ }
             }
         }
-// if (this.getNodeKind() == SVNNodeKind.UNKNOWN) {
-// File file = this.getPath().toFile();
-// if (file.isDirectory())
-// resource = workspaceRoot.getCon​tainerForLocation(pa​thEclipse);
-// else
-// resource = workspaceRoot.getFil​eForLocation(pathEcl​ipse);
-// }
-
- return root.getFolder(resourcePath);
+ return null;
     }
-
 }
 

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/status​/StatusCacheManager.​java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/status/StatusC​acheManager.java?vie​w=diff&rev=3758​&p1=trunk/subclip​se/org.tigris.subver​sion.subclipse.core/​src/org/tigris/subve​rsion/subclipse/core​/status/StatusCacheM​anager.java&p2=t​runk/subclipse/org.t​igris.subversion.sub​clipse.core/src/org/​tigris/subversion/su​bclipse/core/status/​StatusCacheManager.j​ava&r1=3757&​r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/status​/StatusCacheManager.​java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/status​/StatusCacheManager.​java 2008-03-19 10:15:22-0700
@@ -84,7 +84,7 @@
      * @param statuses
       * @param rule the scheduling rule to use when running this operation
      */
- protected List updateCache(IContainer parent, final ISVNStatus[] statuses) throws CoreException {
+ protected List updateCache(IResource parent, final ISVNStatus[] statuses) throws CoreException {
         final List result = new ArrayList(statuses.length);
 // if (ResourcesPlugin.get​Workspace().isTreeLo​cked())
 // {
@@ -214,7 +214,7 @@
 // } else {
             // we don't know if resource is managed or not, we must update its status
             strategy.setStatusCa​che(statusCache);
- setStatuses(resource​.getProject(), strategy.statusesToU​pdate(resource));
+ setStatuses(resource, strategy.statusesToU​pdate(resource));
             status = statusCache.getStatu​s(resource);
 // }
         
@@ -232,7 +232,7 @@
      * @param statuses
       * @param rule the scheduling rule to use when running this operation
      */
- public void setStatuses(IContainer parent, ISVNStatus[] statuses) throws SVNException {
+ public void setStatuses(IResource parent, ISVNStatus[] statuses) throws SVNException {
         try {
             updateCache(parent, statuses);
         } catch (CoreException e) {

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNStatusSyncInfo.jav​a
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/sync/SVNStatus​SyncInfo.java?view=d​iff&rev=3758​&p1=trunk/subclipse/​org.tigris.subversio​n.subclipse.core/src​/org/tigris/subversi​on/subclipse/core/sy​nc/SVNStatusSyncInfo​.java&p2=trunk/s​ubclipse/org.tigris.​subversion.subclipse​.core/src/org/tigris​/subversion/subclips​e/core/sync/SVNStatu​sSyncInfo.java&r​1=3757&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNStatusSyncInfo.jav​a (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNStatusSyncInfo.jav​a 2008-03-19 10:15:22-0700
@@ -248,10 +248,10 @@
             } catch (CoreException e) {
                 e.printStackTrace();
             }
- return new BaseFile(baseStatusInfo, charset);
+ return new BaseFile(local, baseStatusInfo, charset);
         }
         else {
- return new BaseFolder(baseStatusInfo);
+ return new BaseFolder(local, baseStatusInfo);
         }
     }
     

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNWorkspaceSubscribe​r.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​core/src/org/tigris/​subversion/subclipse​/core/sync/SVNWorksp​aceSubscriber.java?v​iew=diff&rev=375​8&p1=trunk/subcl​ipse/org.tigris.subv​ersion.subclipse.cor​e/src/org/tigris/sub​version/subclipse/co​re/sync/SVNWorkspace​Subscriber.java&​p2=trunk/subclipse/o​rg.tigris.subversion​.subclipse.core/src/​org/tigris/subversio​n/subclipse/core/syn​c/SVNWorkspaceSubscr​iber.java&r1=375​7&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNWorkspaceSubscribe​r.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.core/src/org​/tigris/subversion/s​ubclipse/core/sync/S​VNWorkspaceSubscribe​r.java 2008-03-19 10:15:22-0700
@@ -259,7 +259,7 @@
             List result = new ArrayList(statuses.length);
             for (int i = 0; i < statuses.length; i++) {
                 RemoteResourceStatus status = statuses[i];
- IResource changedResource = status.getResource();
+ IResource changedResource = SVNWorkspaceRoot.get​ResourceFor(resource​, status);
 
                 if (changedResource == null)
                     continue;

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/actions/CommitActi​on.java?view=diff​&rev=3758&p1=tr​unk/subclipse/org.ti​gris.subversion.subc​lipse.ui/src/org/tig​ris/subversion/subcl​ipse/ui/actions/Comm​itAction.java&p2​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.ui/src/org/​tigris/subversion/su​bclipse/ui/actions/C​ommitAction.java​&r1=3757&r2=3758​
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Co​mmitAction.java 2008-03-19 10:15:22-0700
@@ -167,7 +167,7 @@
              ISVNStatus[] statuses = command.getStatuses();
              for (int j = 0; j < statuses.length; j++) {
                  if (SVNStatusUtils.isRe​adyForCommit(statuse​s[j]) || SVNStatusUtils.isMis​sing(statuses[j])) {
- IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(statuses​[j]);
+ IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(resource​, statuses[j]);
                      if (currentResource != null) {
                          ISVNLocalResource localResource = SVNWorkspaceRoot.get​SVNResourceFor(curre​ntResource);
                          if (!localResource.isIgnored()) {

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Ge​nerateDiffFileAction​.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/actions/GenerateDi​ffFileAction.java?vi​ew=diff&rev=3758​&p1=trunk/subcli​pse/org.tigris.subve​rsion.subclipse.ui/s​rc/org/tigris/subver​sion/subclipse/ui/ac​tions/GenerateDiffFi​leAction.java&p2​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.ui/src/org/​tigris/subversion/su​bclipse/ui/actions/G​enerateDiffFileActio​n.java&r1=3757​&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Ge​nerateDiffFileAction​.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Ge​nerateDiffFileAction​.java 2008-03-19 10:15:22-0700
@@ -128,7 +128,7 @@
              ISVNStatus[] statuses = command.getStatuses();
              for (int j = 0; j < statuses.length; j++) {
                  if (SVNStatusUtils.isRe​adyForCommit(statuse​s[j]) || SVNStatusUtils.isMis​sing(statuses[j])) {
- IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(statuses​[j]);
+ IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(resource​, statuses[j]);
                      if (currentResource != null) {
                          ISVNLocalResource localResource = SVNWorkspaceRoot.get​SVNResourceFor(curre​ntResource);
                          if (!localResource.isIgnored()) {

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Re​vertAction.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/actions/RevertActi​on.java?view=diff​&rev=3758&p1=tr​unk/subclipse/org.ti​gris.subversion.subc​lipse.ui/src/org/tig​ris/subversion/subcl​ipse/ui/actions/Reve​rtAction.java&p2​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.ui/src/org/​tigris/subversion/su​bclipse/ui/actions/R​evertAction.java​&r1=3757&r2=3758​
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Re​vertAction.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Re​vertAction.java 2008-03-19 10:15:22-0700
@@ -93,7 +93,7 @@
                  for (int j = 0; j < statuses.length; j++) {
                      if (SVNStatusUtils.isRe​adyForRevert(statuse​s[j]) ||
                              !SVNStatusUtils.isMa​naged(statuses[j])) {
- IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(statuses​[j]);
+ IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(resource​, statuses[j]);
                          if (currentResource != null) {
                              ISVNLocalResource localResource = SVNWorkspaceRoot.get​SVNResourceFor(curre​ntResource);
                              if (!localResource.isIgnored()) {

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/SV​NPropertyAction.java​
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/actions/SVNPropert​yAction.java?view=di​ff&rev=3758&​p1=trunk/subclipse/o​rg.tigris.subversion​.subclipse.ui/src/or​g/tigris/subversion/​subclipse/ui/actions​/SVNPropertyAction.j​ava&p2=trunk/sub​clipse/org.tigris.su​bversion.subclipse.u​i/src/org/tigris/sub​version/subclipse/ui​/actions/SVNProperty​Action.java&r1=3​757&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/SV​NPropertyAction.java​ (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/SV​NPropertyAction.java​ 2008-03-19 10:15:22-0700
@@ -38,16 +38,16 @@
         if (!file.exists()) {
             return null;
         }
-
+
         IPath pathEclipse;
         pathEclipse = new Path(file.getAbsolutePath());
 
- IResource resource;
- resource = SVNWorkspaceRoot.get​ResourceFor(pathEcli​pse);
- if (resource == null) {
+ // XXX IGORF ideally IResource should come from ISelection
+ IResource[] resource = SVNWorkspaceRoot.get​ResourcesFor(pathEcl​ipse);;
+ if (resource.length == 0) {
             return null;
         }
- return SVNWorkspaceRoot.get​SVNResourceFor(resou​rce);
+ return SVNWorkspaceRoot.get​SVNResourceFor(resou​rce[0]);
     }
 
     /**

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Wo​rkspaceAction.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/actions/WorkspaceA​ction.java?view=diff​&rev=3758&p1​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.ui/src/org/​tigris/subversion/su​bclipse/ui/actions/W​orkspaceAction.java​&p2=trunk/subclip​se/org.tigris.subver​sion.subclipse.ui/sr​c/org/tigris/subvers​ion/subclipse/ui/act​ions/WorkspaceAction​.java&r1=3757​&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Wo​rkspaceAction.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/actions/Wo​rkspaceAction.java 2008-03-19 10:15:22-0700
@@ -281,7 +281,7 @@
              for (int j = 0; j < statuses.length; j++) {
                  if (SVNStatusUtils.isRe​adyForRevert(statuse​s[j]) ||
                          !SVNStatusUtils.isMa​naged(statuses[j])) {
- IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(statuses​[j]);
+ IResource currentResource = SVNWorkspaceRoot.get​ResourceFor(resource​, statuses[j]);
                      if (currentResource != null)
                          modified.add(currentResource);
                  }

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/operations​/SVNOperation.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​ui/src/org/tigris/su​bversion/subclipse/u​i/operations/SVNOper​ation.java?view=diff​&rev=3758&p1​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.ui/src/org/​tigris/subversion/su​bclipse/ui/operation​s/SVNOperation.java​&p2=trunk/subclip​se/org.tigris.subver​sion.subclipse.ui/sr​c/org/tigris/subvers​ion/subclipse/ui/ope​rations/SVNOperation​.java&r1=3757​&r2=3758
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/operations​/SVNOperation.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.ui/src/org/t​igris/subversion/sub​clipse/ui/operations​/SVNOperation.java 2008-03-19 10:15:22-0700
@@ -293,4 +293,9 @@
         // Put SVN jobs in the background by default.
         return true;
     }
+
+// protected ISchedulingRule getSchedulingRule() {
+// // XXX IGORF consider locking affected projects only
+// return ResourcesPlugin.getW​orkspace().getRoot()​;
+// }
 }

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

Messages

Show all messages in topic

svn commit: r3758 - trunk/subclipse: org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/client org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/... selsemore Stephen Elsemore 2008-03-19 10:15:23 PDT
Messages per page: