<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Teach dashboard code to compare non-integer revisions."
   href="https://bugs.webkit.org/show_bug.cgi?id=152345#c32">Comment # 32</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Teach dashboard code to compare non-integer revisions."
   href="https://bugs.webkit.org/show_bug.cgi?id=152345">bug 152345</a>
              from <span class="vcard"><a class="email" href="mailto:jmarcell&#64;apple.com" title="Jason Marcell &lt;jmarcell&#64;apple.com&gt;"> <span class="fn">Jason Marcell</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=270705&amp;action=diff" name="attach_270705" title="Patch">attachment 270705</a> <a href="attachment.cgi?id=270705&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=270705&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=270705&amp;action=review</a>

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:171
&gt; +            if (!latestProductiveRevisionNumber || !trac.latestRecordedRevisionNumber || !nextRevision)</span >

trac.nextRevision can potentially return undefined if there isn't a nextRevision. We need to check for that and continue if that's the case.

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:304
&gt; +        return undefined;</span >

I needed to return undefined here because returning the same commit if no later commits were found is technically inaccurate and was causing a bug. Also, since I am potentially returning undefined, I needed to add a check at the call site for undefined.

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:151
&gt; +{</span >

This is a new unit test to check for the case where there are no pending commits.

I'm doing a lot of setup here to explicitly set the state whereas a lot of the other tests in this module rely on the module's setup function to set the state up. As Dan and I have discussed, it's probably better to favor this style where we explicitly set the state for each unit tests. I think it would be a good idea to submit a new patch, after landing this one, that makes the other tests in this module match this more explicit style.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>