jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1661032 - /jackrabbit/commons/filevault/trunk/vault-vlt/src/main/java/org/apache/jackrabbit/vault/vlt/actions/Checkout.java
Date Thu, 19 Feb 2015 23:28:18 GMT
Author: tripod
Date: Thu Feb 19 23:28:18 2015
New Revision: 1661032

URL: http://svn.apache.org/r1661032
Log:
JCRVLT-60 The "--filter <file>" parameter does not seem to work

Modified:
    jackrabbit/commons/filevault/trunk/vault-vlt/src/main/java/org/apache/jackrabbit/vault/vlt/actions/Checkout.java

Modified: jackrabbit/commons/filevault/trunk/vault-vlt/src/main/java/org/apache/jackrabbit/vault/vlt/actions/Checkout.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-vlt/src/main/java/org/apache/jackrabbit/vault/vlt/actions/Checkout.java?rev=1661032&r1=1661031&r2=1661032&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-vlt/src/main/java/org/apache/jackrabbit/vault/vlt/actions/Checkout.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-vlt/src/main/java/org/apache/jackrabbit/vault/vlt/actions/Checkout.java
Thu Feb 19 23:28:18 2015
@@ -95,17 +95,26 @@ public class Checkout extends AbstractAc
             if (remoteDir == null) {
                 remoteDir = "/";
             }
+
+            // ensure that we use proper filter (JCRVLT-60)
+            if (ctx.getDefaultFilter() != null) {
+                ((DefaultMetaInf) ctx.getExportRoot().getMetaInf()).setFilter(null);
+            }
+
             VaultFile vaultFile = ctx.getFileSystem(mountPoint).getFile(remoteDir);
             if (vaultFile == null) {
                 throw new VltException(remoteDir, "Error during checkout. Remote directory
does not exit.");
             }
+
             // store filter and config
+            DefaultMetaInf inf = (DefaultMetaInf) ctx.getMetaInf();
+            inf.setConfig(vaultFile.getFileSystem().getConfig());
+            inf.setFilter(vaultFile.getFileSystem().getWorkspaceFilter());
+
             if (!force) {
-                DefaultMetaInf inf = (DefaultMetaInf) ctx.getMetaInf();
-                inf.setConfig(vaultFile.getFileSystem().getConfig());
-                inf.setFilter(vaultFile.getFileSystem().getWorkspaceFilter());
                 inf.save(ctx.getExportRoot().getMetaDir());
             }
+
             if (ctx.isVerbose()) {
                 DumpContext dc = new DumpContext(new PrintWriter(ctx.getStdout()));
                 dc.println("Filter");



Mime
View raw message