Removing redundant git clone operation.
authorHuang Hao <hao.h.huang@intel.com>
Tue, 9 Sep 2014 10:33:08 +0000 (18:33 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Wed, 10 Sep 2014 03:58:03 +0000 (11:58 +0800)
This script use common.git.fetch_change() to create an empty
local git repository and then fetch change from Gerrit.

So the clone operation is totally useless. Removing it will save
more time.

Change-Id: Ia5583e1d3b7f3b342fd9cf68651afb3059e482d3

job_monitor_scm_meta_git.py

index 2a5ac44..1227f2c 100755 (executable)
@@ -12,7 +12,7 @@ from distutils.sysconfig import get_python_lib
 sys.path.insert(0, get_python_lib())
 
 from common.gerrit import Gerrit, get_gerrit_event
-from common.git import clone_gitproject, fetch_change
+from common.git import fetch_change
 from common.iris_rest_client import IrisRestClient
 
 # set default char-set endcoding to utf-8
@@ -85,9 +85,6 @@ def main():
         return -1
 
     proj_path = os.path.join(WORKSPACE, GERRIT_PROJECT)
-    if not clone_gitproject(GERRIT_PROJECT, proj_path):
-        return -1
-
     # fecth and checkout change
     fetch_change(GERRIT_PROJECT, proj_path, events['refspec'])