Hello Thcipriani,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/393815
to review the following change.
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(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/15/393815/1
diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index 971352a..a4201c9 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: newchange
Gerrit-Change-Id: I6d8e328fe26c6db9c26db889ed8b2ab4b1cf31c9
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits