have cherry pick but forgot highlight

This commit is contained in:
Peter Cottle 2013-06-04 14:58:49 -10:00
parent 733ad7d648
commit f400ac238e
2 changed files with 48 additions and 69 deletions

View file

@ -7753,33 +7753,26 @@ GitEngine.prototype.cherrypickStarter = function() {
}, this); }, this);
// error checks are all good, lets go! // error checks are all good, lets go!
// hack up the rebase response to animate this better var destinationBranch = this.resolveID('HEAD');
var animationResponse = {}; var deferred = Q.defer();
animationResponse.destinationBranch = this.resolveID('HEAD'); var chain = deferred.promise;
animationResponse.toRebaseArray = [];
animationResponse.rebaseSteps = [];
// now lets start going through var chainStep = _.bind(function(arg) {
var beforeSnapshot = this.gitVisuals.genSnapshot();
var afterSnapshot;
var newCommit;
_.each(this.generalArgs, function(arg) {
var oldCommit = this.getCommitFromRef(arg); var oldCommit = this.getCommitFromRef(arg);
animationResponse.toRebaseArray.push(oldCommit); var newCommit = this.cherrypick(arg);
return this.animationFactory.playCommitBirthPromiseAnimation(
newCommit = this.cherrypick(arg); newCommit,
this.gitVisuals
afterSnapshot = this.gitVisuals.genSnapshot(); );
animationResponse.rebaseSteps.push({
oldCommit: oldCommit,
newCommit: newCommit,
beforeSnapshot: beforeSnapshot,
afterSnapshot: this.gitVisuals.genSnapshot()
});
beforeSnapshot = afterSnapshot;
}, this); }, this);
this.animationFactory.rebaseAnimation(this.animationQueue, animationResponse, this, this.gitVisuals); _.each(this.generalArgs, function(arg) {
chain = chain.then(function() {
return chainStep(arg);
});
}, this);
this.animationQueue.thenFinish(chain, deferred);
}; };
/************************************* /*************************************
@ -23697,33 +23690,26 @@ GitEngine.prototype.cherrypickStarter = function() {
}, this); }, this);
// error checks are all good, lets go! // error checks are all good, lets go!
// hack up the rebase response to animate this better var destinationBranch = this.resolveID('HEAD');
var animationResponse = {}; var deferred = Q.defer();
animationResponse.destinationBranch = this.resolveID('HEAD'); var chain = deferred.promise;
animationResponse.toRebaseArray = [];
animationResponse.rebaseSteps = [];
// now lets start going through var chainStep = _.bind(function(arg) {
var beforeSnapshot = this.gitVisuals.genSnapshot();
var afterSnapshot;
var newCommit;
_.each(this.generalArgs, function(arg) {
var oldCommit = this.getCommitFromRef(arg); var oldCommit = this.getCommitFromRef(arg);
animationResponse.toRebaseArray.push(oldCommit); var newCommit = this.cherrypick(arg);
return this.animationFactory.playCommitBirthPromiseAnimation(
newCommit = this.cherrypick(arg); newCommit,
this.gitVisuals
afterSnapshot = this.gitVisuals.genSnapshot(); );
animationResponse.rebaseSteps.push({
oldCommit: oldCommit,
newCommit: newCommit,
beforeSnapshot: beforeSnapshot,
afterSnapshot: this.gitVisuals.genSnapshot()
});
beforeSnapshot = afterSnapshot;
}, this); }, this);
this.animationFactory.rebaseAnimation(this.animationQueue, animationResponse, this, this.gitVisuals); _.each(this.generalArgs, function(arg) {
chain = chain.then(function() {
return chainStep(arg);
});
}, this);
this.animationQueue.thenFinish(chain, deferred);
}; };
/************************************* /*************************************

View file

@ -700,33 +700,26 @@ GitEngine.prototype.cherrypickStarter = function() {
}, this); }, this);
// error checks are all good, lets go! // error checks are all good, lets go!
// hack up the rebase response to animate this better var destinationBranch = this.resolveID('HEAD');
var animationResponse = {}; var deferred = Q.defer();
animationResponse.destinationBranch = this.resolveID('HEAD'); var chain = deferred.promise;
animationResponse.toRebaseArray = [];
animationResponse.rebaseSteps = [];
// now lets start going through var chainStep = _.bind(function(arg) {
var beforeSnapshot = this.gitVisuals.genSnapshot();
var afterSnapshot;
var newCommit;
_.each(this.generalArgs, function(arg) {
var oldCommit = this.getCommitFromRef(arg); var oldCommit = this.getCommitFromRef(arg);
animationResponse.toRebaseArray.push(oldCommit); var newCommit = this.cherrypick(arg);
return this.animationFactory.playCommitBirthPromiseAnimation(
newCommit = this.cherrypick(arg); newCommit,
this.gitVisuals
afterSnapshot = this.gitVisuals.genSnapshot(); );
animationResponse.rebaseSteps.push({
oldCommit: oldCommit,
newCommit: newCommit,
beforeSnapshot: beforeSnapshot,
afterSnapshot: this.gitVisuals.genSnapshot()
});
beforeSnapshot = afterSnapshot;
}, this); }, this);
this.animationFactory.rebaseAnimation(this.animationQueue, animationResponse, this, this.gitVisuals); _.each(this.generalArgs, function(arg) {
chain = chain.then(function() {
return chainStep(arg);
});
}, this);
this.animationQueue.thenFinish(chain, deferred);
}; };
/************************************* /*************************************