[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Scap prep: check reference directory exists

2017-10-31 Thread jenkins-bot (Code Review)
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 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Scap prep: check reference directory exists

2017-10-31 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/43/387743/1

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: newchange
Gerrit-Change-Id: Ib83952ad1c475b06d268d3fa719c01e3fd6624be
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Thcipriani 

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