Analysis task should look for a git commit based on abridged hashes
[WebKit-https.git] / Websites / perf.webkit.org / public / v3 / pages / analysis-task-page.js
index e38dfe433dae82763db0902e5e60d5e5b23294a3..bf30b59f2524c1087862b2896127cbe017802c93 100644 (file)
@@ -496,7 +496,12 @@ class AnalysisTaskPage extends PageWithHeading {
         var render = this.render.bind(this);
         return this._task.associateCommit(kind, repository, revision).then(render, function (error) {
             render();
-            alert('Failed to associate the commit: ' + error);
+            if (error == 'AmbiguousRevision')
+                alert('There are multiple revisions that match the specified string: ' + revision);
+            else if (error == 'CommitNotFound')
+                alert('There are no revisions that match the specified string:' + revision);
+            else
+                alert('Failed to associate the commit: ' + error);
         });
     }