⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238532 in webkit


Ignore:
Timestamp:
Nov 26, 2018, 4:48:51 PM (8 years ago)
Author:
aakash_jain@apple.com
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py

    r238529 r238532  
    3636    bug_id = models.IntegerField()
    3737    obsolete = models.BooleanField(default=False)
     38    sent_to_buildbot = models.BooleanField(default=False)
    3839    created = models.DateTimeField(auto_now_add=True)
    3940    modified = models.DateTimeField(auto_now=True)
     
    4344
    4445    @classmethod
    45     def save_patch(cls, patch_id, bug_id=-1, obsolete=False):
     46    def save_patch(cls, patch_id, bug_id=-1, obsolete=False, sent_to_buildbot=False):
    4647        if not Patch.is_valid_patch_id(patch_id):
    4748            return ERR_INVALID_PATCH_ID
     
    5051            _log.info("Patch id {} already exists in database. Skipped saving.".format(patch_id))
    5152            return ERR_EXISTING_PATCH
    52         Patch(patch_id, bug_id, obsolete).save()
     53        Patch(patch_id, bug_id, obsolete, sent_to_buildbot).save()
    5354        _log.info('Saved patch in database, id: {}'.format(patch_id))
    5455        return SUCCESS
     
    6970    def is_existing_patch_id(cls, patch_id):
    7071        return bool(Patch.objects.filter(patch_id=patch_id))
     72
     73    @classmethod
     74    def is_patch_sent_to_buildbot(cls, patch_id):
     75        return Patch.is_existing_patch_id(patch_id) and Patch.objects.get(pk=patch_id).sent_to_buildbot
  • trunk/Tools/ChangeLog

    r238530 r238532  
     12018-11-26  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [ews-app] Add field in Patch object to indicate if it has been sent to Buildbot
     4        https://bugs.webkit.org/show_bug.cgi?id=191929
     5
     6        Reviewed by Lucas Forschler.
     7
     8        * BuildSlaveSupport/ews-app/ews/models/patch.py:
     9        (Patch): Added sent_to_buildbot field.
     10        (Patch.is_patch_sent_to_buildbot): Checks if the patch has been sent to Buildbot.
     11
    1122018-11-26  Aakash Jain  <aakash_jain@apple.com>
    213
Note: See TracChangeset for help on using the changeset viewer.