Changeset 247706 in webkit


Ignore:
Timestamp:
Jul 22, 2019 4:47:16 PM (5 years ago)
Author:
Jonathan Bedard
Message:

resultsdbpy: Handle case where the previous commit doesn't have the changelog
https://bugs.webkit.org/show_bug.cgi?id=200015

Reviewed by Aakash Jain.

  • resultsdbpy/resultsdbpy/model/repository.py:

(WebKitRepository.commit_for_id.diff_changelogs): Allow the previous_response to be None.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r247702 r247706  
     12019-07-22  Jonathan Bedard  <jbedard@apple.com>
     2
     3        resultsdbpy: Handle case where the previous commit doesn't have the changelog
     4        https://bugs.webkit.org/show_bug.cgi?id=200015
     5
     6        Reviewed by Aakash Jain.
     7
     8        * resultsdbpy/resultsdbpy/model/repository.py:
     9        (WebKitRepository.commit_for_id.diff_changelogs): Allow the previous_response to be None.
     10
    1112019-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Tools/resultsdbpy/resultsdbpy/model/repository.py

    r247628 r247706  
    321321                    if previous_response and previous_response.status_code != 200:
    322322                        continue
    323                     if len(current_response.text) == (len(previous_response.text) if previous_response else 0):
     323
     324                    previous_response_length = 0
     325                    if previous_response:
     326                        previous_response_length = len(previous_response.text)
     327                    if len(current_response.text) == previous_response_length:
    324328                        continue
    325 
    326                     if len(current_response.text) < (len(previous_response.text) if previous_response else 0):
     329                    if not previous_response_length or len(current_response.text) < previous_response_length:
    327330                        changelogs[changelog] = current_response.text
    328331                    else:
Note: See TracChangeset for help on using the changeset viewer.