From fb223a6f1c115ac300c12d79cc866e6713418f97 Mon Sep 17 00:00:00 2001 From: Huang Hao Date: Tue, 9 Sep 2014 18:33:08 +0800 Subject: [PATCH] Removing redundant git clone operation. 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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/job_monitor_scm_meta_git.py b/job_monitor_scm_meta_git.py index 2a5ac44..1227f2c 100755 --- a/job_monitor_scm_meta_git.py +++ b/job_monitor_scm_meta_git.py @@ -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']) -- 2.7.4