diff --git a/scm-core/src/main/java/sonia/scm/repository/api/BlameCommandBuilder.java b/scm-core/src/main/java/sonia/scm/repository/api/BlameCommandBuilder.java
index 93891937a5..ab1cb24849 100644
--- a/scm-core/src/main/java/sonia/scm/repository/api/BlameCommandBuilder.java
+++ b/scm-core/src/main/java/sonia/scm/repository/api/BlameCommandBuilder.java
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
import sonia.scm.cache.Cache;
import sonia.scm.cache.CacheManager;
import sonia.scm.repository.BlameResult;
+import sonia.scm.repository.PreProcessorUtil;
import sonia.scm.repository.Repository;
import sonia.scm.repository.RepositoryCacheKey;
import sonia.scm.repository.RepositoryException;
@@ -99,14 +100,16 @@ public final class BlameCommandBuilder
* @param cacheManager cache manager
* @param blameCommand implementation of the {@link BlameCommand}
* @param repository repository to query
+ * @param preProcessorUtil
*/
BlameCommandBuilder(CacheManager cacheManager, BlameCommand blameCommand,
- Repository repository)
+ Repository repository, PreProcessorUtil preProcessorUtil)
{
this.cache = cacheManager.getCache(CacheKey.class, BlameResult.class,
CACHE_NAME);
this.blameCommand = blameCommand;
this.repository = repository;
+ this.preProcessorUtil = preProcessorUtil;
}
//~--- methods --------------------------------------------------------------
@@ -183,6 +186,11 @@ public final class BlameCommandBuilder
}
}
+ if (!disablePreProcessors && (result != null))
+ {
+ preProcessorUtil.prepareForReturn(repository, result);
+ }
+
return result;
}
@@ -205,6 +213,22 @@ public final class BlameCommandBuilder
return this;
}
+ /**
+ * Disable the execution of pre processors.
+ *
+ *
+ * @param disablePreProcessors true to disable the pre processors execution
+ *
+ * @return {@code this}
+ */
+ public BlameCommandBuilder setDisablePreProcessors(
+ boolean disablePreProcessors)
+ {
+ this.disablePreProcessors = disablePreProcessors;
+
+ return this;
+ }
+
/**
* Sets the start revision for the blame.
*
@@ -321,6 +345,12 @@ public final class BlameCommandBuilder
/** disable change */
private boolean disableCache;
+ /** disable the execution of pre processors */
+ private boolean disablePreProcessors = false;
+
+ /** Field description */
+ private PreProcessorUtil preProcessorUtil;
+
/** the repository */
private Repository repository;
diff --git a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java
index 0d72f7c908..8e9416c0c1 100644
--- a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java
+++ b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java
@@ -60,8 +60,8 @@ import java.io.IOException;
* is supported by the {@link RepositoryService} with the
* {@link RepositoryService#isSupported(Command)} method.
*
- *
- * Warning: You should always close the connection to the repository
+ *
+ * Warning: You should always close the connection to the repository
* after work is finished. For closing the connection to the repository use the
* {@link #close()} method.
*
@@ -147,7 +147,7 @@ public final class RepositoryService implements Closeable
}
return new BlameCommandBuilder(cacheManager, provider.getBlameCommand(),
- repository);
+ repository, preProcessorUtil);
}
/**