Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: rev 33 - trunk/subclipse/core/src/org/tigris/subversion/subclipse/core/resources

subclipse
Discussion topic

Back to topic list

subclipse commit: rev 33 - trunk/subclipse/core/src/org/tigris/subversion/subclipse/core/resources

Author dbradby
Full name Daniel Bradby
Date 2003-07-05 19:34:59 PDT
Message Author: dbradby
Date: Sat Jul 5 21:34:55 2003
New Revision: 33

Modified:
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/SVNWorks​paceRoot.java
Log:
added support for .project in check out as project

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/SVNWorks​paceRoot.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/SVNWorks​paceRoot.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/SVNWorks​paceRoot.java Sat Jul 5 21:34:55 2003
@@ -44,6 +44,8 @@
 import org.tigris.subversio​n.svnclientadapter.S​VNClientAdapter;
 
 import com.qintsoft.jsvn.jn​i.ClientException;
+import com.qintsoft.jsvn.jni.DirEntry;
+import com.qintsoft.jsvn.jni.NodeKind;
 import com.qintsoft.jsvn.jni.Revision;
 import com.qintsoft.jsvn.jni.Status;
 
@@ -159,17 +161,34 @@
                             RemoteFolder resource = (RemoteFolder) resources[i];
 
                             project = projects[i];
-
+ boolean deleteDotProject = false;
                             // Perform the checkout
                             SVNClientAdapter svnClient = resource.getReposito​ry().getSVNClient();​
-
+
+ // check if the remote project has a .project file
+ DirEntry[] rootFiles = svnClient.getList(re​source.getUrl(), Revision.HEAD, false);
+ for (int j = 0; j < rootFiles.length; j++) {
+ if ((rootFiles[j].getNodeKind() == NodeKind.file) && (".project".equals(r​ootFiles[j].getPath(​)))) {
+ deleteDotProject = true;
+ }
+ }
+
                             File destPath;
                             if (project.getLocation() == null) {
                                 // project.getLocation is null if the project does not exist in the workspace
                                 destPath = new File(root.getIResour​ce().getLocation().t​oFile(),project.getN​ame());
                                 // we create the directory corresponding to the project and we open it
                                 project.create(null);
- project.open(null);
+ project.open(null);
+
+ if(deleteDotProject){
+
+ IFile projectFile = project.getFile(".project");
+ if (projectFile != null) {
+ // delete the project file, force, no history, without progress monitor
+ projectFile.delete(true, false, null);
+ }
+ }
                             } else {
                                 destPath = project.getLocation().toFile();
                             }
@@ -193,6 +212,8 @@
                     } catch (TeamException e) {
                         // Pass it outside the workspace runnable
                         eHolder[0] = e;
+ } catch (ClientException ce) {
+ eHolder[0] = new TeamException("Error Getting Dir list", ce);
                     } finally {
                         pm.done();
                     }

--------------------​--------------------​--------------------​---------
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: rev 33 - trunk/subclipse/core/src/org/tigris/subversion/subclipse/core/resources dbradby Daniel Bradby 2003-07-05 19:34:59 PDT
Messages per page: