Permalink
Browse files

Merge branch 'master' of github.com:ajaxorg/cloud9

  • Loading branch information...
2 parents dd4111a + 85139f3 commit 1807512a360479739e5634ce26b02d1835a13224 @zefhemel zefhemel committed Jun 1, 2012
Showing with 44 additions and 0 deletions.
  1. +41 −0 plugins-client/ext.console/console.js
  2. +3 −0 plugins-client/ext.revisions/revisions.js
@@ -444,6 +444,47 @@ module.exports = ext.register("ext/console/console", {
this.createNodeProcessLog(message.pid);
return;
case "node-data":
+ if (message.data && message.data.indexOf("Tip: you can") === 0) {
+ (function () {
+ var prjmatch = message.data.match(/http\:\/\/([\w_-]+)\.([\w_-]+)\./);
+ if (!prjmatch) return;
+
+ var user = prjmatch[2];
+ var project = prjmatch[1];
+
+ var urlPath = window.location.pathname.split("/").filter(function (f) { return !!f; });
+
+ if (project !== ide.projectName) {
+ // concurrency bug, project does not match
+ apf.ajax("/api/debug", {
+ method: "POST",
+ contentType: "application/json",
+ data: JSON.stringify({
+ agent: navigator.userAgent,
+ type: "Concurrency bug, project does not match",
+ e: [user, project, urlPath],
+ workspaceId: ide.workspaceId
+ })
+ });
+ }
+ else if (urlPath.length && user !== urlPath[0]) {
+ // concurrency bug, user does not match
+ apf.ajax("/api/debug", {
+ method: "POST",
+ contentType: "application/json",
+ data: JSON.stringify({
+ agent: navigator.userAgent,
+ type: "Concurrency bug, user does not match",
+ e: [user, project, urlPath],
+ workspaceId: ide.workspaceId
+ })
+ });
+ }
+
+ return;
+ }());
+ }
+
logger.logNodeStream(message.data, message.stream, this.getLogStreamOutObject(message.pid, true), ide);
return;
case "node-exit":
@@ -365,6 +365,9 @@ module.exports = ext.register("ext/revisions/revisions", {
var path = Util.stripWSFromPath(e.path);
this.changedPaths.push(path);
+
+ // Force initialization of extension (so that UI is available)
+ ext.initExtension(this);
if (winQuestionRev.visible !== true && !this.isCollab()) { // Only in single user mode
ide.send({

0 comments on commit 1807512

Please sign in to comment.