Title: [171258] trunk/Websites/perf.webkit.org
- Revision
- 171258
- Author
- [email protected]
- Date
- 2014-07-18 21:59:32 -0700 (Fri, 18 Jul 2014)
Log Message
Perf dashboard shouldn't show the full git hash
https://bugs.webkit.org/show_bug.cgi?id=135083
Reviewed by Benjamin Poulain.
Detect Git/Mercurial hash by checking the length.
If it's a hash, use the first 8 characters in the label
while retaining the full length to be used in hyperlinks.
* public/js/helper-classes.js:
(.this.formattedRevisions):
(TestBuild):
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (171257 => 171258)
--- trunk/Websites/perf.webkit.org/ChangeLog 2014-07-19 01:30:35 UTC (rev 171257)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2014-07-19 04:59:32 UTC (rev 171258)
@@ -1,3 +1,19 @@
+2014-07-18 Ryosuke Niwa <[email protected]>
+
+ Perf dashboard shouldn't show the full git hash
+ https://bugs.webkit.org/show_bug.cgi?id=135083
+
+ Reviewed by Benjamin Poulain.
+
+ Detect Git/Mercurial hash by checking the length.
+
+ If it's a hash, use the first 8 characters in the label
+ while retaining the full length to be used in hyperlinks.
+
+ * public/js/helper-classes.js:
+ (.this.formattedRevisions):
+ (TestBuild):
+
2014-05-29 Ryosuke Niwa <[email protected]>
Add an instruction on how to backup the database.
Modified: trunk/Websites/perf.webkit.org/public/js/helper-classes.js (171257 => 171258)
--- trunk/Websites/perf.webkit.org/public/js/helper-classes.js 2014-07-19 01:30:35 UTC (rev 171257)
+++ trunk/Websites/perf.webkit.org/public/js/helper-classes.js 2014-07-19 04:59:32 UTC (rev 171258)
@@ -85,19 +85,30 @@
previousRevision = undefined;
var revisionPrefix = '';
- var revisionDelimitor = '-';
+ var revisionDelimiter = '-';
+ var isHash = false;
if (parseInt(currentRevision) == currentRevision) { // e.g. r12345.
revisionPrefix = 'r';
if (previousRevision)
previousRevision = (parseInt(previousRevision) + 1);
} else if (currentRevision.indexOf(' ') >= 0) // e.g. 10.9 13C64.
- revisionDelimitor = ' - ';
+ revisionDelimiter = ' - ';
+ else if (currentRevision.length == 40) // e.g. git hash
+ isHash = true;
var labelForThisRepository;
- if (previousRevision)
- labelForThisRepository = revisionPrefix + previousRevision + revisionDelimitor + revisionPrefix + currentRevision;
- else
- labelForThisRepository = '@ ' + revisionPrefix + currentRevision;
+ if (isHash) {
+ formattedCurrentHash = currentRevision.substring(0, 8);
+ if (previousRevision)
+ labelForThisRepository = previousRevision.substring(0, 8) + '..' + formattedCurrentHash;
+ else
+ labelForThisRepository = '@ ' + formattedCurrentHash;
+ } else {
+ if (previousRevision)
+ labelForThisRepository = revisionPrefix + previousRevision + revisionDelimiter + revisionPrefix + currentRevision;
+ else
+ labelForThisRepository = '@ ' + revisionPrefix + currentRevision;
+ }
var url;
var repository = repositories[repositoryName];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes