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

Change subject: scap prep: Don't copy the patch dir if it already exists
......................................................................


scap prep: Don't copy the patch dir if it already exists

Change-Id: I6d8e328fe26c6db9c26db889ed8b2ab4b1cf31c9
---
M scap/plugins/prep.py
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Thcipriani: Looks good to me, but someone else must approve
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index 971352a..513b3e4 100644
--- a/scap/plugins/prep.py
+++ b/scap/plugins/prep.py
@@ -103,10 +103,12 @@
                 self.config['stage_dir'],
                 '{}{}'.format(self.arguments.prefix, old_branch)
             )
-            shutil.copytree(
-                os.path.join('/srv/patches', old_branch),
-                os.path.join('/srv/patches', self.arguments.branch)
-            )
+            patch_path = os.path.join('/srv/patches', self.arguments.branch)
+            if not os.path.exists(patch_path):
+                shutil.copytree(
+                    os.path.join('/srv/patches', old_branch),
+                    os.path.join(patch_path)
+                )
 
         if os.path.isdir(dest_dir):
             self.get_logger().info('Version already checked out')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d8e328fe26c6db9c26db889ed8b2ab4b1cf31c9
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
Gerrit-Reviewer: Urbanecm <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to