Skip SR if all the packages are from forked git. 17/169217/1
authorhyokeun <hyokeun.jeon@samsung.com>
Mon, 5 Feb 2018 05:09:42 +0000 (14:09 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Mon, 5 Feb 2018 05:09:42 +0000 (14:09 +0900)
Change-Id: I8da6893ba47a69da479ef531fb90c0b11db8938c

common/workflow.py

index e0e6873..7d4f5ea 100644 (file)
@@ -547,6 +547,14 @@ def create_project(build, obs_project, submit_list, mode=MODE_NORMAL):
                     _path = os.path.join(os.getenv('PUBLIC_GIT_CACHE_DIR'), gerrit_path[1:])
                     _rev = Git(_path).get_tag(u.get('git_tag'))['tagrevision']
             git_revision.append(_rev)
+
+    # Return if all the packages are forked git
+    if mode == MODE_SRSYNC:
+        if git_revision[0] == EMPTY_REV and \
+            git_revision.count(git_revision[0]) == len(git_revision):
+            print 'ALL HAVE THE EMPTY_REV. SKIP!'
+            return
+
     obs_target_prj = submit_list[0].get('obs_target_prj', _dest_obs_prj)
     ref_obs_target_prj = submit_list[0].get('ref_obs_target_prj', obs_target_prj)
     if mode == MODE_SRSYNC: