mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
finally have get string now
This commit is contained in:
parent
f1752d115b
commit
f7af08c5fe
5 changed files with 117 additions and 115 deletions
156
build/bundle.js
156
build/bundle.js
|
@ -7158,10 +7158,10 @@ function GitEngine(options) {
|
||||||
this.eventBaton = options.eventBaton;
|
this.eventBaton = options.eventBaton;
|
||||||
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
|
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
|
||||||
|
|
||||||
// poor man's dependency injection
|
// poor man's dependency injection. we cant reassign
|
||||||
if (options.animationFactory) {
|
// the module variable because its get clobbered :P
|
||||||
AnimationFactory = options.animationFactory;
|
this.animationFactory = (options.animationFactory) ?
|
||||||
}
|
options.animationFactory : AnimationFactory;
|
||||||
|
|
||||||
// global variable to keep track of the options given
|
// global variable to keep track of the options given
|
||||||
// along with the command call.
|
// along with the command call.
|
||||||
|
@ -7392,7 +7392,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
|
||||||
// and then here is the crazy part -- we need the ORIGIN to refresh
|
// and then here is the crazy part -- we need the ORIGIN to refresh
|
||||||
// itself in a separate animation. @_____@
|
// itself in a separate animation. @_____@
|
||||||
this.origin.externalRefresh();
|
this.origin.externalRefresh();
|
||||||
AnimationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
|
this.animationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// we only clone from our current state, so we can safely assume all of our
|
// we only clone from our current state, so we can safely assume all of our
|
||||||
|
@ -7741,7 +7741,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
var destBranch = this.resolveID('HEAD');
|
var destBranch = this.resolveID('HEAD');
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toRevert,
|
toRevert,
|
||||||
destBranch
|
destBranch
|
||||||
|
@ -7760,7 +7760,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
});
|
});
|
||||||
base = newCommit;
|
base = newCommit;
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -7776,7 +7776,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
// done! update our location
|
// done! update our location
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
this.setTargetLocation('HEAD', base);
|
this.setTargetLocation('HEAD', base);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
this.animationQueue.thenFinish(chain, deferred);
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
|
@ -7835,7 +7835,7 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
var destinationBranch = this.resolveID('HEAD');
|
var destinationBranch = this.resolveID('HEAD');
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toCherrypick,
|
toCherrypick,
|
||||||
destinationBranch
|
destinationBranch
|
||||||
|
@ -7843,7 +7843,7 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
|
|
||||||
var chainStep = _.bind(function(commit) {
|
var chainStep = _.bind(function(commit) {
|
||||||
var newCommit = this.cherrypick(commit);
|
var newCommit = this.cherrypick(commit);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8001,7 +8001,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
// now make the promise chain to make each commit
|
// now make the promise chain to make each commit
|
||||||
var chainStep = _.bind(function(id, parents) {
|
var chainStep = _.bind(function(id, parents) {
|
||||||
var newCommit = makeCommit(id, parents);
|
var newCommit = makeCommit(id, parents);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.origin.gitVisuals
|
this.origin.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8012,7 +8012,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
|
|
||||||
_.each(commitsToMake, function(commitJSON) {
|
_.each(commitsToMake, function(commitJSON) {
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.refs[commitJSON.id],
|
this.refs[commitJSON.id],
|
||||||
remoteBranch
|
remoteBranch
|
||||||
);
|
);
|
||||||
|
@ -8031,8 +8031,8 @@ GitEngine.prototype.push = function(options) {
|
||||||
var remoteCommit = this.origin.refs[localLocationID];
|
var remoteCommit = this.origin.refs[localLocationID];
|
||||||
this.origin.setTargetLocation(remoteBranch, remoteCommit);
|
this.origin.setTargetLocation(remoteBranch, remoteCommit);
|
||||||
// unhighlight local
|
// unhighlight local
|
||||||
AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
return AnimationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
// HAX HAX update o/master
|
// HAX HAX update o/master
|
||||||
|
@ -8041,7 +8041,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
var remoteBranchID = localBranch.getRemoteBranchIDFromTracking();
|
var remoteBranchID = localBranch.getRemoteBranchIDFromTracking();
|
||||||
// less hacks hax
|
// less hacks hax
|
||||||
this.setTargetLocation(this.refs[remoteBranchID], localCommit);
|
this.setTargetLocation(this.refs[remoteBranchID], localCommit);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -8106,7 +8106,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
// now make the promise chain to make each commit
|
// now make the promise chain to make each commit
|
||||||
var chainStep = _.bind(function(id, parents) {
|
var chainStep = _.bind(function(id, parents) {
|
||||||
var newCommit = makeCommit(id, parents);
|
var newCommit = makeCommit(id, parents);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8117,7 +8117,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
|
|
||||||
_.each(commitsToMake, function(commitJSON) {
|
_.each(commitsToMake, function(commitJSON) {
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.origin.refs[commitJSON.id],
|
this.origin.refs[commitJSON.id],
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -8136,8 +8136,8 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
var localCommit = this.refs[originLocationID];
|
var localCommit = this.refs[originLocationID];
|
||||||
this.setTargetLocation(localBranch, localCommit);
|
this.setTargetLocation(localBranch, localCommit);
|
||||||
// unhighlight origin
|
// unhighlight origin
|
||||||
AnimationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -8188,13 +8188,13 @@ GitEngine.prototype.pullFinishWithRebase = function(
|
||||||
// delay a bit after the intense refresh animation from
|
// delay a bit after the intense refresh animation from
|
||||||
// fetch
|
// fetch
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(300);
|
return this.animationFactory.getDelayedPromise(300);
|
||||||
});
|
});
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight last commit on o/master to color of
|
// highlight last commit on o/master to color of
|
||||||
// local branch
|
// local branch
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(remoteBranch),
|
this.getCommitFromRef(remoteBranch),
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -8219,13 +8219,13 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
// delay a bit after the intense refresh animation from
|
// delay a bit after the intense refresh animation from
|
||||||
// fetch
|
// fetch
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(300);
|
return this.animationFactory.getDelayedPromise(300);
|
||||||
});
|
});
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight last commit on o/master to color of
|
// highlight last commit on o/master to color of
|
||||||
// local branch
|
// local branch
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(remoteBranch),
|
this.getCommitFromRef(remoteBranch),
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -8233,7 +8233,7 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight commit on master to color of remote
|
// highlight commit on master to color of remote
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(localBranch),
|
this.getCommitFromRef(localBranch),
|
||||||
remoteBranch
|
remoteBranch
|
||||||
);
|
);
|
||||||
|
@ -8241,16 +8241,16 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
|
||||||
// delay and merge
|
// delay and merge
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
return this.animationFactory.getDelayedPromise(700);
|
||||||
});
|
});
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
var newCommit = this.merge('o/master');
|
var newCommit = this.merge('o/master');
|
||||||
if (!newCommit) {
|
if (!newCommit) {
|
||||||
// it is a fast forward
|
// it is a fast forward
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}
|
}
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8294,7 +8294,7 @@ GitEngine.prototype.fakeTeamwork = function(numToMake, branch) {
|
||||||
|
|
||||||
var chainStep = _.bind(function() {
|
var chainStep = _.bind(function() {
|
||||||
var newCommit = makeOriginCommit();
|
var newCommit = makeOriginCommit();
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.origin.gitVisuals
|
this.origin.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8367,7 +8367,7 @@ GitEngine.prototype.commitStarter = function() {
|
||||||
newCommit.set('commitMessage', msg);
|
newCommit.set('commitMessage', msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
var promise = AnimationFactory.playCommitBirthPromiseAnimation(
|
var promise = this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8874,7 +8874,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toRebase,
|
toRebase,
|
||||||
destinationBranch
|
destinationBranch
|
||||||
|
@ -8888,7 +8888,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
var newCommit = this.makeCommit([base], newId);
|
var newCommit = this.makeCommit([base], newId);
|
||||||
base = newCommit;
|
base = newCommit;
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -8911,7 +8911,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
this.setTargetLocation(currentLocation, base);
|
this.setTargetLocation(currentLocation, base);
|
||||||
this.checkout(currentLocation);
|
this.checkout(currentLocation);
|
||||||
}
|
}
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -8927,11 +8927,11 @@ GitEngine.prototype.mergeStarter = function() {
|
||||||
|
|
||||||
if (newCommit === undefined) {
|
if (newCommit === undefined) {
|
||||||
// its just a fast forwrard
|
// its just a fast forwrard
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals);
|
this.animationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.merge = function(targetSource) {
|
GitEngine.prototype.merge = function(targetSource) {
|
||||||
|
@ -9171,7 +9171,7 @@ GitEngine.prototype.externalRefresh = function() {
|
||||||
this.animationQueue = new AnimationQueue({
|
this.animationQueue = new AnimationQueue({
|
||||||
callback: function() {}
|
callback: function() {}
|
||||||
});
|
});
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
this.animationQueue.start();
|
this.animationQueue.start();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9206,7 +9206,7 @@ GitEngine.prototype.dispatch = function(command, deferred) {
|
||||||
|
|
||||||
// only add the refresh if we didn't do manual animations
|
// only add the refresh if we didn't do manual animations
|
||||||
if (!this.animationQueue.get('animations').length && !willStartAuto) {
|
if (!this.animationQueue.get('animations').length && !willStartAuto) {
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
}
|
}
|
||||||
|
|
||||||
// animation queue will call the callback when its done
|
// animation queue will call the callback when its done
|
||||||
|
@ -9891,7 +9891,6 @@ TreeCompare.dispatch = function(levelBlob, goalTreeString, treeToCompare) {
|
||||||
TreeCompare.compareAllBranchesWithinTreesAndHEAD = function(treeA, treeB) {
|
TreeCompare.compareAllBranchesWithinTreesAndHEAD = function(treeA, treeB) {
|
||||||
treeA = this.convertTreeSafe(treeA);
|
treeA = this.convertTreeSafe(treeA);
|
||||||
treeB = this.convertTreeSafe(treeB);
|
treeB = this.convertTreeSafe(treeB);
|
||||||
debugger;
|
|
||||||
|
|
||||||
return treeA.HEAD.target == treeB.HEAD.target && this.compareAllBranchesWithinTrees(treeA, treeB);
|
return treeA.HEAD.target == treeB.HEAD.target && this.compareAllBranchesWithinTrees(treeA, treeB);
|
||||||
};
|
};
|
||||||
|
@ -11189,7 +11188,7 @@ var CommandsHelperBar = HelperBar.extend({
|
||||||
id: 'undo'
|
id: 'undo'
|
||||||
}, {
|
}, {
|
||||||
text: 'Objective',
|
text: 'Objective',
|
||||||
id: 'objectve'
|
id: 'objective'
|
||||||
}, {
|
}, {
|
||||||
text: 'Help',
|
text: 'Help',
|
||||||
id: 'help'
|
id: 'help'
|
||||||
|
@ -11265,7 +11264,7 @@ var CanvasTerminalHolder = BaseView.extend({
|
||||||
this.destination = $('body');
|
this.destination = $('body');
|
||||||
this.JSON = {
|
this.JSON = {
|
||||||
title: options.title || intl.str('goal-to-reach'),
|
title: options.title || intl.str('goal-to-reach'),
|
||||||
text: options.text || intl.str('goal-vis-info')
|
text: options.text || intl.str('hide-goal')
|
||||||
};
|
};
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
@ -15218,6 +15217,7 @@ function getMockFactory() {
|
||||||
aQueue.finish();
|
aQueue.finish();
|
||||||
};
|
};
|
||||||
mockFactory.refreshTree = function(aQueue, gitVisuals) {
|
mockFactory.refreshTree = function(aQueue, gitVisuals) {
|
||||||
|
console.log('being used');
|
||||||
aQueue.finish();
|
aQueue.finish();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23607,6 +23607,7 @@ function getMockFactory() {
|
||||||
aQueue.finish();
|
aQueue.finish();
|
||||||
};
|
};
|
||||||
mockFactory.refreshTree = function(aQueue, gitVisuals) {
|
mockFactory.refreshTree = function(aQueue, gitVisuals) {
|
||||||
|
console.log('being used');
|
||||||
aQueue.finish();
|
aQueue.finish();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23713,10 +23714,10 @@ function GitEngine(options) {
|
||||||
this.eventBaton = options.eventBaton;
|
this.eventBaton = options.eventBaton;
|
||||||
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
|
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
|
||||||
|
|
||||||
// poor man's dependency injection
|
// poor man's dependency injection. we cant reassign
|
||||||
if (options.animationFactory) {
|
// the module variable because its get clobbered :P
|
||||||
AnimationFactory = options.animationFactory;
|
this.animationFactory = (options.animationFactory) ?
|
||||||
}
|
options.animationFactory : AnimationFactory;
|
||||||
|
|
||||||
// global variable to keep track of the options given
|
// global variable to keep track of the options given
|
||||||
// along with the command call.
|
// along with the command call.
|
||||||
|
@ -23947,7 +23948,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
|
||||||
// and then here is the crazy part -- we need the ORIGIN to refresh
|
// and then here is the crazy part -- we need the ORIGIN to refresh
|
||||||
// itself in a separate animation. @_____@
|
// itself in a separate animation. @_____@
|
||||||
this.origin.externalRefresh();
|
this.origin.externalRefresh();
|
||||||
AnimationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
|
this.animationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// we only clone from our current state, so we can safely assume all of our
|
// we only clone from our current state, so we can safely assume all of our
|
||||||
|
@ -24296,7 +24297,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
var destBranch = this.resolveID('HEAD');
|
var destBranch = this.resolveID('HEAD');
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toRevert,
|
toRevert,
|
||||||
destBranch
|
destBranch
|
||||||
|
@ -24315,7 +24316,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
});
|
});
|
||||||
base = newCommit;
|
base = newCommit;
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -24331,7 +24332,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
// done! update our location
|
// done! update our location
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
this.setTargetLocation('HEAD', base);
|
this.setTargetLocation('HEAD', base);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
this.animationQueue.thenFinish(chain, deferred);
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
|
@ -24390,7 +24391,7 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
var destinationBranch = this.resolveID('HEAD');
|
var destinationBranch = this.resolveID('HEAD');
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toCherrypick,
|
toCherrypick,
|
||||||
destinationBranch
|
destinationBranch
|
||||||
|
@ -24398,7 +24399,7 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
|
|
||||||
var chainStep = _.bind(function(commit) {
|
var chainStep = _.bind(function(commit) {
|
||||||
var newCommit = this.cherrypick(commit);
|
var newCommit = this.cherrypick(commit);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -24556,7 +24557,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
// now make the promise chain to make each commit
|
// now make the promise chain to make each commit
|
||||||
var chainStep = _.bind(function(id, parents) {
|
var chainStep = _.bind(function(id, parents) {
|
||||||
var newCommit = makeCommit(id, parents);
|
var newCommit = makeCommit(id, parents);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.origin.gitVisuals
|
this.origin.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -24567,7 +24568,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
|
|
||||||
_.each(commitsToMake, function(commitJSON) {
|
_.each(commitsToMake, function(commitJSON) {
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.refs[commitJSON.id],
|
this.refs[commitJSON.id],
|
||||||
remoteBranch
|
remoteBranch
|
||||||
);
|
);
|
||||||
|
@ -24586,8 +24587,8 @@ GitEngine.prototype.push = function(options) {
|
||||||
var remoteCommit = this.origin.refs[localLocationID];
|
var remoteCommit = this.origin.refs[localLocationID];
|
||||||
this.origin.setTargetLocation(remoteBranch, remoteCommit);
|
this.origin.setTargetLocation(remoteBranch, remoteCommit);
|
||||||
// unhighlight local
|
// unhighlight local
|
||||||
AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
return AnimationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
// HAX HAX update o/master
|
// HAX HAX update o/master
|
||||||
|
@ -24596,7 +24597,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
var remoteBranchID = localBranch.getRemoteBranchIDFromTracking();
|
var remoteBranchID = localBranch.getRemoteBranchIDFromTracking();
|
||||||
// less hacks hax
|
// less hacks hax
|
||||||
this.setTargetLocation(this.refs[remoteBranchID], localCommit);
|
this.setTargetLocation(this.refs[remoteBranchID], localCommit);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -24661,7 +24662,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
// now make the promise chain to make each commit
|
// now make the promise chain to make each commit
|
||||||
var chainStep = _.bind(function(id, parents) {
|
var chainStep = _.bind(function(id, parents) {
|
||||||
var newCommit = makeCommit(id, parents);
|
var newCommit = makeCommit(id, parents);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -24672,7 +24673,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
|
|
||||||
_.each(commitsToMake, function(commitJSON) {
|
_.each(commitsToMake, function(commitJSON) {
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.origin.refs[commitJSON.id],
|
this.origin.refs[commitJSON.id],
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -24691,8 +24692,8 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
var localCommit = this.refs[originLocationID];
|
var localCommit = this.refs[originLocationID];
|
||||||
this.setTargetLocation(localBranch, localCommit);
|
this.setTargetLocation(localBranch, localCommit);
|
||||||
// unhighlight origin
|
// unhighlight origin
|
||||||
AnimationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -24743,13 +24744,13 @@ GitEngine.prototype.pullFinishWithRebase = function(
|
||||||
// delay a bit after the intense refresh animation from
|
// delay a bit after the intense refresh animation from
|
||||||
// fetch
|
// fetch
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(300);
|
return this.animationFactory.getDelayedPromise(300);
|
||||||
});
|
});
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight last commit on o/master to color of
|
// highlight last commit on o/master to color of
|
||||||
// local branch
|
// local branch
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(remoteBranch),
|
this.getCommitFromRef(remoteBranch),
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -24774,13 +24775,13 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
// delay a bit after the intense refresh animation from
|
// delay a bit after the intense refresh animation from
|
||||||
// fetch
|
// fetch
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(300);
|
return this.animationFactory.getDelayedPromise(300);
|
||||||
});
|
});
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight last commit on o/master to color of
|
// highlight last commit on o/master to color of
|
||||||
// local branch
|
// local branch
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(remoteBranch),
|
this.getCommitFromRef(remoteBranch),
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -24788,7 +24789,7 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight commit on master to color of remote
|
// highlight commit on master to color of remote
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(localBranch),
|
this.getCommitFromRef(localBranch),
|
||||||
remoteBranch
|
remoteBranch
|
||||||
);
|
);
|
||||||
|
@ -24796,16 +24797,16 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
|
||||||
// delay and merge
|
// delay and merge
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
return this.animationFactory.getDelayedPromise(700);
|
||||||
});
|
});
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
var newCommit = this.merge('o/master');
|
var newCommit = this.merge('o/master');
|
||||||
if (!newCommit) {
|
if (!newCommit) {
|
||||||
// it is a fast forward
|
// it is a fast forward
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}
|
}
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -24849,7 +24850,7 @@ GitEngine.prototype.fakeTeamwork = function(numToMake, branch) {
|
||||||
|
|
||||||
var chainStep = _.bind(function() {
|
var chainStep = _.bind(function() {
|
||||||
var newCommit = makeOriginCommit();
|
var newCommit = makeOriginCommit();
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.origin.gitVisuals
|
this.origin.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -24922,7 +24923,7 @@ GitEngine.prototype.commitStarter = function() {
|
||||||
newCommit.set('commitMessage', msg);
|
newCommit.set('commitMessage', msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
var promise = AnimationFactory.playCommitBirthPromiseAnimation(
|
var promise = this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -25429,7 +25430,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toRebase,
|
toRebase,
|
||||||
destinationBranch
|
destinationBranch
|
||||||
|
@ -25443,7 +25444,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
var newCommit = this.makeCommit([base], newId);
|
var newCommit = this.makeCommit([base], newId);
|
||||||
base = newCommit;
|
base = newCommit;
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -25466,7 +25467,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
this.setTargetLocation(currentLocation, base);
|
this.setTargetLocation(currentLocation, base);
|
||||||
this.checkout(currentLocation);
|
this.checkout(currentLocation);
|
||||||
}
|
}
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -25482,11 +25483,11 @@ GitEngine.prototype.mergeStarter = function() {
|
||||||
|
|
||||||
if (newCommit === undefined) {
|
if (newCommit === undefined) {
|
||||||
// its just a fast forwrard
|
// its just a fast forwrard
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals);
|
this.animationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.merge = function(targetSource) {
|
GitEngine.prototype.merge = function(targetSource) {
|
||||||
|
@ -25726,7 +25727,7 @@ GitEngine.prototype.externalRefresh = function() {
|
||||||
this.animationQueue = new AnimationQueue({
|
this.animationQueue = new AnimationQueue({
|
||||||
callback: function() {}
|
callback: function() {}
|
||||||
});
|
});
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
this.animationQueue.start();
|
this.animationQueue.start();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25761,7 +25762,7 @@ GitEngine.prototype.dispatch = function(command, deferred) {
|
||||||
|
|
||||||
// only add the refresh if we didn't do manual animations
|
// only add the refresh if we didn't do manual animations
|
||||||
if (!this.animationQueue.get('animations').length && !willStartAuto) {
|
if (!this.animationQueue.get('animations').length && !willStartAuto) {
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
}
|
}
|
||||||
|
|
||||||
// animation queue will call the callback when its done
|
// animation queue will call the callback when its done
|
||||||
|
@ -26146,7 +26147,6 @@ TreeCompare.dispatch = function(levelBlob, goalTreeString, treeToCompare) {
|
||||||
TreeCompare.compareAllBranchesWithinTreesAndHEAD = function(treeA, treeB) {
|
TreeCompare.compareAllBranchesWithinTreesAndHEAD = function(treeA, treeB) {
|
||||||
treeA = this.convertTreeSafe(treeA);
|
treeA = this.convertTreeSafe(treeA);
|
||||||
treeB = this.convertTreeSafe(treeB);
|
treeB = this.convertTreeSafe(treeB);
|
||||||
debugger;
|
|
||||||
|
|
||||||
return treeA.HEAD.target == treeB.HEAD.target && this.compareAllBranchesWithinTrees(treeA, treeB);
|
return treeA.HEAD.target == treeB.HEAD.target && this.compareAllBranchesWithinTrees(treeA, treeB);
|
||||||
};
|
};
|
||||||
|
@ -31589,7 +31589,7 @@ var CommandsHelperBar = HelperBar.extend({
|
||||||
id: 'undo'
|
id: 'undo'
|
||||||
}, {
|
}, {
|
||||||
text: 'Objective',
|
text: 'Objective',
|
||||||
id: 'objectve'
|
id: 'objective'
|
||||||
}, {
|
}, {
|
||||||
text: 'Help',
|
text: 'Help',
|
||||||
id: 'help'
|
id: 'help'
|
||||||
|
@ -31665,7 +31665,7 @@ var CanvasTerminalHolder = BaseView.extend({
|
||||||
this.destination = $('body');
|
this.destination = $('body');
|
||||||
this.JSON = {
|
this.JSON = {
|
||||||
title: options.title || intl.str('goal-to-reach'),
|
title: options.title || intl.str('goal-to-reach'),
|
||||||
text: options.text || intl.str('goal-vis-info')
|
text: options.text || intl.str('hide-goal')
|
||||||
};
|
};
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
|
1
build/bundle.min.ff235a10.js
Normal file
1
build/bundle.min.ff235a10.js
Normal file
File diff suppressed because one or more lines are too long
1
build/bundle.min.js
vendored
Normal file
1
build/bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -434,7 +434,7 @@
|
||||||
For a much easier time perusing the source, see the individual files at:
|
For a much easier time perusing the source, see the individual files at:
|
||||||
https://github.com/pcottle/learnGitBranching
|
https://github.com/pcottle/learnGitBranching
|
||||||
-->
|
-->
|
||||||
<script src="build/bundle.js"></script>
|
<script src="build/bundle.min.ff235a10.js"></script>
|
||||||
|
|
||||||
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
||||||
The downside? No raw logs to parse for analytics, so I have to include
|
The downside? No raw logs to parse for analytics, so I have to include
|
||||||
|
|
|
@ -28,10 +28,10 @@ function GitEngine(options) {
|
||||||
this.eventBaton = options.eventBaton;
|
this.eventBaton = options.eventBaton;
|
||||||
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
|
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
|
||||||
|
|
||||||
// poor man's dependency injection
|
// poor man's dependency injection. we cant reassign
|
||||||
if (options.animationFactory) {
|
// the module variable because its get clobbered :P
|
||||||
AnimationFactory = options.animationFactory;
|
this.animationFactory = (options.animationFactory) ?
|
||||||
}
|
options.animationFactory : AnimationFactory;
|
||||||
|
|
||||||
// global variable to keep track of the options given
|
// global variable to keep track of the options given
|
||||||
// along with the command call.
|
// along with the command call.
|
||||||
|
@ -262,7 +262,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
|
||||||
// and then here is the crazy part -- we need the ORIGIN to refresh
|
// and then here is the crazy part -- we need the ORIGIN to refresh
|
||||||
// itself in a separate animation. @_____@
|
// itself in a separate animation. @_____@
|
||||||
this.origin.externalRefresh();
|
this.origin.externalRefresh();
|
||||||
AnimationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
|
this.animationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// we only clone from our current state, so we can safely assume all of our
|
// we only clone from our current state, so we can safely assume all of our
|
||||||
|
@ -611,7 +611,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
var destBranch = this.resolveID('HEAD');
|
var destBranch = this.resolveID('HEAD');
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toRevert,
|
toRevert,
|
||||||
destBranch
|
destBranch
|
||||||
|
@ -630,7 +630,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
});
|
});
|
||||||
base = newCommit;
|
base = newCommit;
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -646,7 +646,7 @@ GitEngine.prototype.revert = function(whichCommits) {
|
||||||
// done! update our location
|
// done! update our location
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
this.setTargetLocation('HEAD', base);
|
this.setTargetLocation('HEAD', base);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
this.animationQueue.thenFinish(chain, deferred);
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
|
@ -705,7 +705,7 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
var destinationBranch = this.resolveID('HEAD');
|
var destinationBranch = this.resolveID('HEAD');
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toCherrypick,
|
toCherrypick,
|
||||||
destinationBranch
|
destinationBranch
|
||||||
|
@ -713,7 +713,7 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
|
|
||||||
var chainStep = _.bind(function(commit) {
|
var chainStep = _.bind(function(commit) {
|
||||||
var newCommit = this.cherrypick(commit);
|
var newCommit = this.cherrypick(commit);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -871,7 +871,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
// now make the promise chain to make each commit
|
// now make the promise chain to make each commit
|
||||||
var chainStep = _.bind(function(id, parents) {
|
var chainStep = _.bind(function(id, parents) {
|
||||||
var newCommit = makeCommit(id, parents);
|
var newCommit = makeCommit(id, parents);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.origin.gitVisuals
|
this.origin.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -882,7 +882,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
|
|
||||||
_.each(commitsToMake, function(commitJSON) {
|
_.each(commitsToMake, function(commitJSON) {
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.refs[commitJSON.id],
|
this.refs[commitJSON.id],
|
||||||
remoteBranch
|
remoteBranch
|
||||||
);
|
);
|
||||||
|
@ -901,8 +901,8 @@ GitEngine.prototype.push = function(options) {
|
||||||
var remoteCommit = this.origin.refs[localLocationID];
|
var remoteCommit = this.origin.refs[localLocationID];
|
||||||
this.origin.setTargetLocation(remoteBranch, remoteCommit);
|
this.origin.setTargetLocation(remoteBranch, remoteCommit);
|
||||||
// unhighlight local
|
// unhighlight local
|
||||||
AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
return AnimationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
// HAX HAX update o/master
|
// HAX HAX update o/master
|
||||||
|
@ -911,7 +911,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
var remoteBranchID = localBranch.getRemoteBranchIDFromTracking();
|
var remoteBranchID = localBranch.getRemoteBranchIDFromTracking();
|
||||||
// less hacks hax
|
// less hacks hax
|
||||||
this.setTargetLocation(this.refs[remoteBranchID], localCommit);
|
this.setTargetLocation(this.refs[remoteBranchID], localCommit);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -976,7 +976,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
// now make the promise chain to make each commit
|
// now make the promise chain to make each commit
|
||||||
var chainStep = _.bind(function(id, parents) {
|
var chainStep = _.bind(function(id, parents) {
|
||||||
var newCommit = makeCommit(id, parents);
|
var newCommit = makeCommit(id, parents);
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -987,7 +987,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
|
|
||||||
_.each(commitsToMake, function(commitJSON) {
|
_.each(commitsToMake, function(commitJSON) {
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.origin.refs[commitJSON.id],
|
this.origin.refs[commitJSON.id],
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -1006,8 +1006,8 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
var localCommit = this.refs[originLocationID];
|
var localCommit = this.refs[originLocationID];
|
||||||
this.setTargetLocation(localBranch, localCommit);
|
this.setTargetLocation(localBranch, localCommit);
|
||||||
// unhighlight origin
|
// unhighlight origin
|
||||||
AnimationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
this.animationFactory.playRefreshAnimation(this.origin.gitVisuals);
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -1058,13 +1058,13 @@ GitEngine.prototype.pullFinishWithRebase = function(
|
||||||
// delay a bit after the intense refresh animation from
|
// delay a bit after the intense refresh animation from
|
||||||
// fetch
|
// fetch
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(300);
|
return this.animationFactory.getDelayedPromise(300);
|
||||||
});
|
});
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight last commit on o/master to color of
|
// highlight last commit on o/master to color of
|
||||||
// local branch
|
// local branch
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(remoteBranch),
|
this.getCommitFromRef(remoteBranch),
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -1089,13 +1089,13 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
// delay a bit after the intense refresh animation from
|
// delay a bit after the intense refresh animation from
|
||||||
// fetch
|
// fetch
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(300);
|
return this.animationFactory.getDelayedPromise(300);
|
||||||
});
|
});
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight last commit on o/master to color of
|
// highlight last commit on o/master to color of
|
||||||
// local branch
|
// local branch
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(remoteBranch),
|
this.getCommitFromRef(remoteBranch),
|
||||||
localBranch
|
localBranch
|
||||||
);
|
);
|
||||||
|
@ -1103,7 +1103,7 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
// highlight commit on master to color of remote
|
// highlight commit on master to color of remote
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
return this.animationFactory.playHighlightPromiseAnimation(
|
||||||
this.getCommitFromRef(localBranch),
|
this.getCommitFromRef(localBranch),
|
||||||
remoteBranch
|
remoteBranch
|
||||||
);
|
);
|
||||||
|
@ -1111,16 +1111,16 @@ GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
|
||||||
// delay and merge
|
// delay and merge
|
||||||
chain = chain.then(function() {
|
chain = chain.then(function() {
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
return this.animationFactory.getDelayedPromise(700);
|
||||||
});
|
});
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
var newCommit = this.merge('o/master');
|
var newCommit = this.merge('o/master');
|
||||||
if (!newCommit) {
|
if (!newCommit) {
|
||||||
// it is a fast forward
|
// it is a fast forward
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}
|
}
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -1164,7 +1164,7 @@ GitEngine.prototype.fakeTeamwork = function(numToMake, branch) {
|
||||||
|
|
||||||
var chainStep = _.bind(function() {
|
var chainStep = _.bind(function() {
|
||||||
var newCommit = makeOriginCommit();
|
var newCommit = makeOriginCommit();
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.origin.gitVisuals
|
this.origin.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -1237,7 +1237,7 @@ GitEngine.prototype.commitStarter = function() {
|
||||||
newCommit.set('commitMessage', msg);
|
newCommit.set('commitMessage', msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
var promise = AnimationFactory.playCommitBirthPromiseAnimation(
|
var promise = this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -1744,7 +1744,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
chain = AnimationFactory.highlightEachWithPromise(
|
chain = this.animationFactory.highlightEachWithPromise(
|
||||||
chain,
|
chain,
|
||||||
toRebase,
|
toRebase,
|
||||||
destinationBranch
|
destinationBranch
|
||||||
|
@ -1758,7 +1758,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
var newCommit = this.makeCommit([base], newId);
|
var newCommit = this.makeCommit([base], newId);
|
||||||
base = newCommit;
|
base = newCommit;
|
||||||
|
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit,
|
newCommit,
|
||||||
this.gitVisuals
|
this.gitVisuals
|
||||||
);
|
);
|
||||||
|
@ -1781,7 +1781,7 @@ GitEngine.prototype.rebaseFinish = function(
|
||||||
this.setTargetLocation(currentLocation, base);
|
this.setTargetLocation(currentLocation, base);
|
||||||
this.checkout(currentLocation);
|
this.checkout(currentLocation);
|
||||||
}
|
}
|
||||||
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
if (!options.dontResolvePromise) {
|
if (!options.dontResolvePromise) {
|
||||||
|
@ -1797,11 +1797,11 @@ GitEngine.prototype.mergeStarter = function() {
|
||||||
|
|
||||||
if (newCommit === undefined) {
|
if (newCommit === undefined) {
|
||||||
// its just a fast forwrard
|
// its just a fast forwrard
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals);
|
this.animationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.merge = function(targetSource) {
|
GitEngine.prototype.merge = function(targetSource) {
|
||||||
|
@ -2041,7 +2041,7 @@ GitEngine.prototype.externalRefresh = function() {
|
||||||
this.animationQueue = new AnimationQueue({
|
this.animationQueue = new AnimationQueue({
|
||||||
callback: function() {}
|
callback: function() {}
|
||||||
});
|
});
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
this.animationQueue.start();
|
this.animationQueue.start();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2076,7 +2076,7 @@ GitEngine.prototype.dispatch = function(command, deferred) {
|
||||||
|
|
||||||
// only add the refresh if we didn't do manual animations
|
// only add the refresh if we didn't do manual animations
|
||||||
if (!this.animationQueue.get('animations').length && !willStartAuto) {
|
if (!this.animationQueue.get('animations').length && !willStartAuto) {
|
||||||
AnimationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
}
|
}
|
||||||
|
|
||||||
// animation queue will call the callback when its done
|
// animation queue will call the callback when its done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue