diff --git a/src/commandModel.js b/src/commandModel.js index fc8f02ee..1d450c74 100644 --- a/src/commandModel.js +++ b/src/commandModel.js @@ -31,11 +31,9 @@ var Command = Backbone.Model.extend({ this.parse(); } catch (err) { if (err instanceof CommandProcessError || - err instanceof GitError) { - this.set('status', 'error'); - this.set('error', err); - } else if (err instanceof CommandResult) { - this.set('status', 'finished'); + err instanceof GitError || + err instanceof CommandResult) { + // erroChanged() will handle status and all of that this.set('error', err); } else { throw err; @@ -44,13 +42,17 @@ var Command = Backbone.Model.extend({ }, errorChanged: function(model, err) { - this.set('err', err); - this.set('status', 'error'); + if (err instanceof CommandProcessError || + err instanceof GitError) { + this.set('status', 'error'); + } else if (err instanceof CommandResult) { + this.set('status', 'finished'); + } this.formatError(); }, formatError: function() { - this.set('result', this.get('err').toResult()); + this.set('result', this.get('error').toResult()); }, getShortcutMap: function() { diff --git a/src/commandViews.js b/src/commandViews.js index d562851d..117eb258 100644 --- a/src/commandViews.js +++ b/src/commandViews.js @@ -143,6 +143,7 @@ var CommandView = Backbone.View.extend({ }, this.model.toJSON() ); + console.log('rendering', this.model.toJSON()); this.$el.html(this.template(json)); return this; diff --git a/todo.txt b/todo.txt index ce14e32d..82117e4c 100644 --- a/todo.txt +++ b/todo.txt @@ -1,3 +1,9 @@ SAFE calling on tree animation -- so it will update when necessary (AnimationArbiter class) +Real refs -- by putting in labels and background box and everything. also highlight with head +The Tree.Snapshot() idea + +closures on animations + +you name it!