Title: [238532] trunk/Tools
- Revision
- 238532
- Author
- aakash_j...@apple.com
- Date
- 2018-11-26 16:48:51 -0800 (Mon, 26 Nov 2018)
Log Message
[ews-app] Add field in Patch object to indicate if it has been sent to Buildbot
https://bugs.webkit.org/show_bug.cgi?id=191929
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-app/ews/models/patch.py:
(Patch): Added sent_to_buildbot field.
(Patch.is_patch_sent_to_buildbot): Checks if the patch has been sent to Buildbot.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py (238531 => 238532)
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py 2018-11-27 00:47:48 UTC (rev 238531)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py 2018-11-27 00:48:51 UTC (rev 238532)
@@ -35,6 +35,7 @@
patch_id = models.IntegerField(primary_key=True)
bug_id = models.IntegerField()
obsolete = models.BooleanField(default=False)
+ sent_to_buildbot = models.BooleanField(default=False)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
@@ -42,7 +43,7 @@
return str(self.patch_id)
@classmethod
- def save_patch(cls, patch_id, bug_id=-1, obsolete=False):
+ def save_patch(cls, patch_id, bug_id=-1, obsolete=False, sent_to_buildbot=False):
if not Patch.is_valid_patch_id(patch_id):
return ERR_INVALID_PATCH_ID
@@ -49,7 +50,7 @@
if Patch.is_existing_patch_id(patch_id):
_log.info("Patch id {} already exists in database. Skipped saving.".format(patch_id))
return ERR_EXISTING_PATCH
- Patch(patch_id, bug_id, obsolete).save()
+ Patch(patch_id, bug_id, obsolete, sent_to_buildbot).save()
_log.info('Saved patch in database, id: {}'.format(patch_id))
return SUCCESS
@@ -68,3 +69,7 @@
@classmethod
def is_existing_patch_id(cls, patch_id):
return bool(Patch.objects.filter(patch_id=patch_id))
+
+ @classmethod
+ def is_patch_sent_to_buildbot(cls, patch_id):
+ return Patch.is_existing_patch_id(patch_id) and Patch.objects.get(pk=patch_id).sent_to_buildbot
Modified: trunk/Tools/ChangeLog (238531 => 238532)
--- trunk/Tools/ChangeLog 2018-11-27 00:47:48 UTC (rev 238531)
+++ trunk/Tools/ChangeLog 2018-11-27 00:48:51 UTC (rev 238532)
@@ -1,5 +1,16 @@
2018-11-26 Aakash Jain <aakash_j...@apple.com>
+ [ews-app] Add field in Patch object to indicate if it has been sent to Buildbot
+ https://bugs.webkit.org/show_bug.cgi?id=191929
+
+ Reviewed by Lucas Forschler.
+
+ * BuildSlaveSupport/ews-app/ews/models/patch.py:
+ (Patch): Added sent_to_buildbot field.
+ (Patch.is_patch_sent_to_buildbot): Checks if the patch has been sent to Buildbot.
+
+2018-11-26 Aakash Jain <aakash_j...@apple.com>
+
[ews-app] Add a config file
https://bugs.webkit.org/show_bug.cgi?id=191933
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes