fake teamwork better

This commit is contained in:
Peter Cottle 2013-07-16 09:11:26 -07:00
parent f7af08c5fe
commit 62867c9f43
9 changed files with 44 additions and 27 deletions

View file

@ -8187,9 +8187,9 @@ GitEngine.prototype.pullFinishWithRebase = function(
// delay a bit after the intense refresh animation from
// fetch
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(300);
});
}, this));
chain = chain.then(_.bind(function() {
// highlight last commit on o/master to color of
@ -8218,9 +8218,9 @@ GitEngine.prototype.pullFinishWithMerge = function(
// delay a bit after the intense refresh animation from
// fetch
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(300);
});
}, this));
chain = chain.then(_.bind(function() {
// highlight last commit on o/master to color of
@ -8240,9 +8240,9 @@ GitEngine.prototype.pullFinishWithMerge = function(
}, this));
// delay and merge
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(700);
});
}, this));
chain = chain.then(_.bind(function() {
var newCommit = this.merge('o/master');
if (!newCommit) {
@ -8272,8 +8272,12 @@ GitEngine.prototype.fakeTeamworkStarter = function() {
}
this.validateArgBounds(this.generalArgs, 0, 2);
// ugly command line arg parsing
var branch = this.generalArgs[0] || 'master';
var numToMake = this.generalArgs[1] || 1;
if (!this.origin.refs[branch]) {
branch = 'master';
}
var numToMake = parseInt(this.generalArgs[0], 10) || this.generalArgs[1] || 1;
// make sure its a branch and exists
var destBranch = this.origin.resolveID(branch);
@ -15033,6 +15037,8 @@ var GitDemonstrationView = ContainedBase.extend({
var whenHaveTree = Q.defer();
HeadlessGit.getTreeQuick(this.options.beforeCommand, whenHaveTree);
whenHaveTree.promise.then(_.bind(function(tree) {
console.log('the before command i got', this.options.beforeCommand);
console.log(tree, 'is what i got');
this.mainVis.gitEngine.loadTree(tree);
this.mainVis.gitVisuals.refreshTreeHarsh();
}, this));
@ -15217,7 +15223,6 @@ function getMockFactory() {
aQueue.finish();
};
mockFactory.refreshTree = function(aQueue, gitVisuals) {
console.log('being used');
aQueue.finish();
};
@ -23607,7 +23612,6 @@ function getMockFactory() {
aQueue.finish();
};
mockFactory.refreshTree = function(aQueue, gitVisuals) {
console.log('being used');
aQueue.finish();
};
@ -24743,9 +24747,9 @@ GitEngine.prototype.pullFinishWithRebase = function(
// delay a bit after the intense refresh animation from
// fetch
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(300);
});
}, this));
chain = chain.then(_.bind(function() {
// highlight last commit on o/master to color of
@ -24774,9 +24778,9 @@ GitEngine.prototype.pullFinishWithMerge = function(
// delay a bit after the intense refresh animation from
// fetch
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(300);
});
}, this));
chain = chain.then(_.bind(function() {
// highlight last commit on o/master to color of
@ -24796,9 +24800,9 @@ GitEngine.prototype.pullFinishWithMerge = function(
}, this));
// delay and merge
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(700);
});
}, this));
chain = chain.then(_.bind(function() {
var newCommit = this.merge('o/master');
if (!newCommit) {
@ -24828,8 +24832,12 @@ GitEngine.prototype.fakeTeamworkStarter = function() {
}
this.validateArgBounds(this.generalArgs, 0, 2);
// ugly command line arg parsing
var branch = this.generalArgs[0] || 'master';
var numToMake = this.generalArgs[1] || 1;
if (!this.origin.refs[branch]) {
branch = 'master';
}
var numToMake = parseInt(this.generalArgs[0], 10) || this.generalArgs[1] || 1;
// make sure its a branch and exists
var destBranch = this.origin.resolveID(branch);
@ -30720,6 +30728,8 @@ var GitDemonstrationView = ContainedBase.extend({
var whenHaveTree = Q.defer();
HeadlessGit.getTreeQuick(this.options.beforeCommand, whenHaveTree);
whenHaveTree.promise.then(_.bind(function(tree) {
console.log('the before command i got', this.options.beforeCommand);
console.log(tree, 'is what i got');
this.mainVis.gitEngine.loadTree(tree);
this.mainVis.gitVisuals.refreshTreeHarsh();
}, this));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
build/bundle.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -154,6 +154,8 @@ module.exports = function(grunt) {
describe: true,
expect: true,
it: true,
runs: true,
waitsFor: true,
exports: true,
process: true
}

View file

@ -434,7 +434,7 @@
For a much easier time perusing the source, see the individual files at:
https://github.com/pcottle/learnGitBranching
-->
<script src="build/bundle.min.ff235a10.js"></script>
<script src="build/bundle.min.421f004f.js"></script>
<!-- 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

View file

@ -32,7 +32,6 @@ function getMockFactory() {
aQueue.finish();
};
mockFactory.refreshTree = function(aQueue, gitVisuals) {
console.log('being used');
aQueue.finish();
};

View file

@ -1057,9 +1057,9 @@ GitEngine.prototype.pullFinishWithRebase = function(
// delay a bit after the intense refresh animation from
// fetch
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(300);
});
}, this));
chain = chain.then(_.bind(function() {
// highlight last commit on o/master to color of
@ -1088,9 +1088,9 @@ GitEngine.prototype.pullFinishWithMerge = function(
// delay a bit after the intense refresh animation from
// fetch
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(300);
});
}, this));
chain = chain.then(_.bind(function() {
// highlight last commit on o/master to color of
@ -1110,9 +1110,9 @@ GitEngine.prototype.pullFinishWithMerge = function(
}, this));
// delay and merge
chain = chain.then(function() {
chain = chain.then(_.bind(function() {
return this.animationFactory.getDelayedPromise(700);
});
}, this));
chain = chain.then(_.bind(function() {
var newCommit = this.merge('o/master');
if (!newCommit) {
@ -1142,8 +1142,12 @@ GitEngine.prototype.fakeTeamworkStarter = function() {
}
this.validateArgBounds(this.generalArgs, 0, 2);
// ugly command line arg parsing
var branch = this.generalArgs[0] || 'master';
var numToMake = this.generalArgs[1] || 1;
if (!this.origin.refs[branch]) {
branch = 'master';
}
var numToMake = parseInt(this.generalArgs[0], 10) || this.generalArgs[1] || 1;
// make sure its a branch and exists
var destBranch = this.origin.resolveID(branch);

View file

@ -99,6 +99,8 @@ var GitDemonstrationView = ContainedBase.extend({
var whenHaveTree = Q.defer();
HeadlessGit.getTreeQuick(this.options.beforeCommand, whenHaveTree);
whenHaveTree.promise.then(_.bind(function(tree) {
console.log('the before command i got', this.options.beforeCommand);
console.log(tree, 'is what i got');
this.mainVis.gitEngine.loadTree(tree);
this.mainVis.gitVisuals.refreshTreeHarsh();
}, this));