Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: rev 24 - trunk/svnant/src/main/org/tigris/subversion/svnant

subclipse
Discussion topic

Back to topic list

subclipse commit: rev 24 - trunk/svnant/src/main/org/tigris/subversion/svnant

Author cchab
Full name chabanois cédric
Date 2003-07-01 13:17:48 PDT
Message Author: cchab
Date: Tue Jul 1 15:17:47 2003
New Revision: 24

Modified:
   trunk/svnant/src/mai​n/org/tigris/subvers​ion/svnant/Delete.ja​va
Log:
SVNClientAdapter.remove now takes an array of url or files
SVNAnt changed occordingly

Modified: trunk/svnant/src/mai​n/org/tigris/subvers​ion/svnant/Delete.ja​va
====================​====================​====================​==================
--- trunk/svnant/src/mai​n/org/tigris/subvers​ion/svnant/Delete.ja​va (original)
+++ trunk/svnant/src/mai​n/org/tigris/subvers​ion/svnant/Delete.ja​va Tue Jul 1 15:17:47 2003
@@ -134,7 +134,7 @@
      */
     private void deleteUrl(URL url, String message) throws BuildException {
         try {
- svnClient.remove(url,message);
+ svnClient.remove(new URL[] { url },message);
         } catch (ClientException e) {
             throw new BuildException("Cannot delete url "+url.toString(),e);
         }
@@ -149,7 +149,7 @@
      */
     private void deleteFile(File file, boolean force) throws BuildException {
         try {
- svnClient.remove(file,force);
+ svnClient.remove(new File[] { file },force);
         } catch (ClientException e) {
             throw new BuildException("Cannot delete file or directory "+file.getAbsolutePath(),e);
         }
@@ -166,29 +166,25 @@
         File baseDir = fs.getDir(getProject()); // base dir
         String[] files = ds.getIncludedFiles();
         String[] dirs = ds.getIncludedDirectories();
+ File[] filesAndDirs = new File[files.length+dirs.length];
+ int j = 0;
 
- // first : we delete directories
- // this also delete subdirectories and files contained in this directory
         for (int i = 0; i < dirs.length; i++) {
- File dir = new File(baseDir, dirs[i]);
- try {
- svnClient.remove(dir,force);
- } catch (ClientException e) {
- log("Cannot delete directory "+dir.getAbsolutePath());
- }
+ filesAndDirs[j] = new File(baseDir, dirs[i]);
+ j++;
         }
-
- // then we delete files
- // note that some files can have already been deleted during
- // directories deletion
         for (int i = 0; i < files.length; i++) {
- File file = new File(baseDir, files[i]);
- try {
- svnClient.remove(file,force);
- } catch (ClientException e) {
- log("Cannot delete file "+file.getAbsolutePath());
- }
+ filesAndDirs[j] = new File(baseDir, files[i]);
+ j++;
         }
+
+ // note : when we delete dirs, this also delete subdirectories and files
+ // contained in this directory
+ try {
+ svnClient.remove(fil​esAndDirs,force);
+ } catch (ClientException e) {
+ log("Cannot delete file "+file.getAbsolutePath());
+ }
     }
 
     /**

--------------------​--------------------​--------------------​---------
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 24 - trunk/svnant/src/main/org/tigris/subversion/svnant cchab chabanois cédric 2003-07-01 13:17:48 PDT
Messages per page: