commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r765863 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes: ChangeSetPerformer.java ChangeSetResults.java
Date Fri, 17 Apr 2009 06:31:52 GMT
Author: grobmeier
Date: Fri Apr 17 06:31:52 2009
New Revision: 765863

URL: http://svn.apache.org/viewvc?rev=765863&view=rev
Log:
Additions from ChangeSets replace entry which are allready in the stream. Test to do

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java?rev=765863&r1=765862&r2=765863&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java
Fri Apr 17 06:31:52 2009
@@ -103,7 +103,7 @@
             }
 
             if (copy) {
-                if (!isDeletedLater(workingSet, entry)) {
+                if (!isDeletedLater(workingSet, entry) && !results.hasBeenAdded(entry.getName()))
{
                     copyStream(in, out, entry);
                     results.addedFromStream(entry.getName());
                 }

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java?rev=765863&r1=765862&r2=765863&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java
Fri Apr 17 06:31:52 2009
@@ -40,4 +40,11 @@
     public List getDeleted() {
         return deleted;
     }
+    
+    boolean hasBeenAdded(String filename) {
+        if(addedFromChangeSet.contains(filename) || addedFromStream.contains(filename)) {
+            return true;
+        } 
+        return false;
+    }
 }



Mime
View raw message