[Webkit-unassigned] [Bug 153818] Format revisions for display according to repository type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 3 21:42:36 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=153818

Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #270610|review?                     |review+, commit-queue-
              Flags|                            |

--- Comment #5 from Alexey Proskuryakov <ap at webkit.org> ---
Comment on attachment 270610
  --> https://bugs.webkit.org/attachment.cgi?id=270610
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=270610&action=review

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:127
> -            linkElement.textContent = "r" + commit.revisionNumber;
> +            linkElement.textContent = this._formatRevisionForDisplay(commit.revisionNumber, branch.repository);

Is "revision number" the right terminology for git?

Just curious, no need to update all the naming for this patch even if it's not quite right.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:339
> +    _formatRevisionForDisplay: function (revision, repository)

Please remove the space after "function".

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:347
> +        if (repository.isSVN)
> +            return "r" + revision;
> +        else if (repository.isGit)
> +            // Truncating for display. Git traditionally uses seven characters for a short hash.
> +            return revision.substr(0, 7);
> +        else
> +            console.assert(false, "Should not get here; " + repository.name + " did not specify a known VCS type.");

WebKit style is to not use else after return. Here is how I would write this:

console.assert(repository.isSVN || repository.isGit);
if (repository.isSVN)
    return "r" + revision;
// Truncating for display. Git traditionally uses seven characters for a short hash.
return revision.substr(0, 7);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160204/a22a6f0d/attachment-0001.html>


More information about the webkit-unassigned mailing list