Changeset 171258 in webkit
- Timestamp:
- Jul 18, 2014 9:59:32 PM (10 years ago)
- Location:
- trunk/Websites/perf.webkit.org
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/perf.webkit.org/ChangeLog
r169471 r171258 1 2014-07-18 Ryosuke Niwa <rniwa@webkit.org> 2 3 Perf dashboard shouldn't show the full git hash 4 https://bugs.webkit.org/show_bug.cgi?id=135083 5 6 Reviewed by Benjamin Poulain. 7 8 Detect Git/Mercurial hash by checking the length. 9 10 If it's a hash, use the first 8 characters in the label 11 while retaining the full length to be used in hyperlinks. 12 13 * public/js/helper-classes.js: 14 (.this.formattedRevisions): 15 (TestBuild): 16 1 17 2014-05-29 Ryosuke Niwa <rniwa@webkit.org> 2 18 -
trunk/Websites/perf.webkit.org/public/js/helper-classes.js
r166995 r171258 86 86 87 87 var revisionPrefix = ''; 88 var revisionDelimitor = '-'; 88 var revisionDelimiter = '-'; 89 var isHash = false; 89 90 if (parseInt(currentRevision) == currentRevision) { // e.g. r12345. 90 91 revisionPrefix = 'r'; … … 92 93 previousRevision = (parseInt(previousRevision) + 1); 93 94 } else if (currentRevision.indexOf(' ') >= 0) // e.g. 10.9 13C64. 94 revisionDelimitor = ' - '; 95 revisionDelimiter = ' - '; 96 else if (currentRevision.length == 40) // e.g. git hash 97 isHash = true; 95 98 96 99 var labelForThisRepository; 97 if (previousRevision) 98 labelForThisRepository = revisionPrefix + previousRevision + revisionDelimitor + revisionPrefix + currentRevision; 99 else 100 labelForThisRepository = '@ ' + revisionPrefix + currentRevision; 100 if (isHash) { 101 formattedCurrentHash = currentRevision.substring(0, 8); 102 if (previousRevision) 103 labelForThisRepository = previousRevision.substring(0, 8) + '..' + formattedCurrentHash; 104 else 105 labelForThisRepository = '@ ' + formattedCurrentHash; 106 } else { 107 if (previousRevision) 108 labelForThisRepository = revisionPrefix + previousRevision + revisionDelimiter + revisionPrefix + currentRevision; 109 else 110 labelForThisRepository = '@ ' + revisionPrefix + currentRevision; 111 } 101 112 102 113 var url;
Note: See TracChangeset
for help on using the changeset viewer.