jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/387743 )

Change subject: Scap prep: check reference directory exists
......................................................................


Scap prep: check reference directory exists

To setup scap testing environments, we need to be able to run scap prep
without having any prior wikiversions. We currently assume that the last
wikiversion from wikiversions.json is checked out on disk. This isn't
the case for new servers or for testing environments.

Change-Id: Ib83952ad1c475b06d268d3fa719c01e3fd6624be
---
M scap/plugins/prep.py
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index c87d8f0..b207f9c 100644
--- a/scap/plugins/prep.py
+++ b/scap/plugins/prep.py
@@ -100,7 +100,11 @@
             self.get_logger().info('Version already checked out')
             return 0
 
-        git.fetch(dest_dir, GERRIT_URL + 'mediawiki/core', copy_dir)
+        reference_dir = None
+        if os.path.isdir(copy_dir):
+            reference_dir = copy_dir
+
+        git.fetch(dest_dir, GERRIT_URL + 'mediawiki/core', reference_dir)
 
         with utils.cd(dest_dir):
             if subprocess.call(['/usr/bin/git', 'config',

-- 
To view, visit https://gerrit.wikimedia.org/r/387743
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib83952ad1c475b06d268d3fa719c01e3fd6624be
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Thcipriani <tcipri...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Urbanecm <martin.urba...@wikimedia.cz>
Gerrit-Reviewer: Zoranzoki21 <zorandori4...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to