You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/08/30 20:17:00 UTC

[07/50] [abbrv] stratos git commit: Remove the logic to get unstaged_files

Remove the logic to get unstaged_files


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/99d5cdc2
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/99d5cdc2
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/99d5cdc2

Branch: refs/heads/master
Commit: 99d5cdc2bdb9226fa19e6752adafb80750f2d4a5
Parents: 57ecc64
Author: gayangunarathne <ga...@wso2.com>
Authored: Wed Aug 26 15:54:29 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Wed Aug 26 15:54:29 2015 +0530

----------------------------------------------------------------------
 .../modules/artifactmgt/git/agentgithandler.py         | 13 +------------
 .../test/PythonCartridgeAgentTest.java                 |  3 ++-
 .../src/test/resources/agent.conf                      |  2 +-
 3 files changed, 4 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/99d5cdc2/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
index ea72266..bc82b35 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
@@ -395,18 +395,7 @@ class AgentGitHandler:
 
         if "Changes not staged for commit" in output:
             # there are modified files
-            modified_lines = output.split("\n\n")[2].split("\n")
-            for mod_line in modified_lines:
-                file_name = mod_line.split(":")[1].strip()
-                unstaged_files["modified"].append(file_name)
-
-        if "Untracked files" in output:
-            # there are untracked files
-            untracked_files = output.split("Untracked files:")[1].split("\n\n")[1].split("\n")
-            for unt_line in untracked_files:
-                unstaged_files["untracked"].append(unt_line.strip())
-
-        return True, unstaged_files
+            return True, unstaged_files
 
     @staticmethod
     def stage_all(repo_path):

http://git-wip-us.apache.org/repos/asf/stratos/blob/99d5cdc2/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java b/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
index 620e11b..9705228 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
+++ b/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
@@ -88,7 +88,7 @@ public class PythonCartridgeAgentTest {
     private int cepPort = 7712;
     private BrokerService broker = new BrokerService();
     private static final String ACTIVEMQ_AMQP_BIND_ADDRESS = "tcp://localhost:61617";
-    private static final String ACTIVEMQ_MQTT_BIND_ADDRESS = "mqtt://localhost:1884";
+    private static final String ACTIVEMQ_MQTT_BIND_ADDRESS = "mqtt://localhost:1885";
     private static final UUID PYTHON_AGENT_DIR_NAME = UUID.randomUUID();
 
     public PythonCartridgeAgentTest(ArtifactUpdatedEvent artifactUpdatedEvent, Boolean expectedResult) {
@@ -256,6 +256,7 @@ public class PythonCartridgeAgentTest {
         publicRepoEvent.setClusterId(CLUSTER_ID);
         publicRepoEvent.setTenantId(TENANT_ID);
         publicRepoEvent.setRepoURL("https://bitbucket.org/testapache2211/opentestrepo1.git");
+        publicRepoEvent.setCommitEnabled(true);
         return publicRepoEvent;
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/99d5cdc2/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf b/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
index 04f4a0c..136433d 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
+++ b/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
@@ -17,7 +17,7 @@
 
 [agent]
 mb.ip                                 =localhost
-mb.port                               =1884
+mb.port                               =1885
 listen.address                        =localhost
 thrift.receiver.ip                    =localhost
 thrift.receiver.port                  =7712