You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/01/23 14:07:35 UTC
git commit: fixing STRATOS-380: local git repo path issue in MT
scenarios
Updated Branches:
refs/heads/master 15365fe8d -> 6d6ed0007
fixing STRATOS-380: local git repo path issue in MT scenarios
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/6d6ed000
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/6d6ed000
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/6d6ed000
Branch: refs/heads/master
Commit: 6d6ed0007c26a6ecc21590b55c7dc181f139a012
Parents: 15365fe
Author: Isuru <is...@wso2.com>
Authored: Thu Jan 23 18:37:08 2014 +0530
Committer: Isuru <is...@wso2.com>
Committed: Thu Jan 23 18:37:08 2014 +0530
----------------------------------------------------------------------
.../git/impl/GitBasedArtifactRepository.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6d6ed000/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
index 5e1d0af..c614ad7 100644
--- a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
+++ b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
@@ -117,7 +117,9 @@ public class GitBasedArtifactRepository {
FileRepository localRepo = null;
try {
- localRepo = new FileRepository(new File(gitLocalRepoPath + "/.git"));
+ // localRepo = new FileRepository(new File(gitLocalRepoPath + "/.git"));
+ // Fixing STRATOS-380
+ localRepo = new FileRepository(new File(gitRepoCtx.getGitLocalRepoPath() + "/.git"));
} catch (IOException e) {
e.printStackTrace();
@@ -473,7 +475,7 @@ public class GitBasedArtifactRepository {
if (repoCtxt.getArtifactSyncSchedular() == null) {
// create a new ScheduledExecutorService instance
final ScheduledExecutorService artifactSyncScheduler = Executors.newScheduledThreadPool(1,
- new ArtifactSyncTaskThreadFactory(repoInformation));
+ new ArtifactSyncTaskThreadFactory(repoCtxt.getGitLocalRepoPath()));
// schedule at the given interval
artifactSyncScheduler.scheduleAtFixedRate(new ArtifactSyncTask(repoInformation), delay, delay, TimeUnit.SECONDS);
@@ -799,14 +801,14 @@ public class GitBasedArtifactRepository {
class ArtifactSyncTaskThreadFactory implements ThreadFactory {
- private RepositoryInformation repositoryInformation;
+ private String localRepoPath;
- public ArtifactSyncTaskThreadFactory (RepositoryInformation repositoryInformation) {
- this.repositoryInformation = repositoryInformation;
+ public ArtifactSyncTaskThreadFactory (String localRepoPath) {
+ this.localRepoPath = localRepoPath;
}
public Thread newThread(Runnable r) {
- return new Thread(r, "Artifact Update Thread - " + repositoryInformation.getRepoPath());
+ return new Thread(r, "Artifact Update Thread - " + localRepoPath);
}
}