mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-06 12:44:28 +02:00
Fixed typos in comments and strings
This commit is contained in:
parent
5e8d83536e
commit
694f414e22
21 changed files with 46 additions and 46 deletions
|
@ -26,7 +26,7 @@ var getHeadlessSummary = function(headless) {
|
||||||
var expectLevelAsync = function(headless, levelBlob) {
|
var expectLevelAsync = function(headless, levelBlob) {
|
||||||
var command = levelBlob.solutionCommand;
|
var command = levelBlob.solutionCommand;
|
||||||
if (command.indexOf('git rebase -i') !== -1) {
|
if (command.indexOf('git rebase -i') !== -1) {
|
||||||
// dont do interactive rebase levels
|
// don't do interactive rebase levels
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ describe('Git Remotes', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('doesnt fetch if out of sync, but will update explicit dest if specified', function() {
|
it('doesn\'t fetch if out of sync, but will update explicit dest if specified', function() {
|
||||||
expectTreeAsync(
|
expectTreeAsync(
|
||||||
'git clone; git fakeTeamwork; go HEAD~1; git fetch origin master:master;go master; gc; go HEAD~1; git fakeTeamwork;git fetch origin master:master',
|
'git clone; git fakeTeamwork; go HEAD~1; git fetch origin master:master;go master; gc; go HEAD~1; git fakeTeamwork;git fetch origin master:master',
|
||||||
'{"branches":{"master":{"target":"C3","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"}},"HEAD":{"target":"C2","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C4","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C4":{"parents":["C2"],"id":"C4"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
'{"branches":{"master":{"target":"C3","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"}},"HEAD":{"target":"C2","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C4","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C4":{"parents":["C2"],"id":"C4"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
||||||
|
@ -304,14 +304,14 @@ describe('Git Remotes', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('doesnt let you fetch to master if you are checked out there', function() {
|
it('doesn\'t let you fetch to master if you are checked out there', function() {
|
||||||
expectTreeAsync(
|
expectTreeAsync(
|
||||||
'git clone; git push origin master:foo; git fakeTeamwork foo 2; git fetch origin foo^:blah; git fetch foo:master',
|
'git clone; git push origin master:foo; git fakeTeamwork foo 2; git fetch origin foo^:blah; git fetch foo:master',
|
||||||
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null},"o/foo":{"target":"C1","id":"o/foo","remoteTrackingBranchID":null},"blah":{"target":"C2","id":"blah","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null},"foo":{"target":"C3","id":"foo","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"}},"HEAD":{"target":"foo","id":"HEAD"}}}'
|
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null},"o/foo":{"target":"C1","id":"o/foo","remoteTrackingBranchID":null},"blah":{"target":"C2","id":"blah","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null},"foo":{"target":"C3","id":"foo","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"}},"HEAD":{"target":"foo","id":"HEAD"}}}'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('doesnt let you delete branches that dont exist', function() {
|
it('doesn\'t let you delete branches that don\'t exist', function() {
|
||||||
expectTreeAsync(
|
expectTreeAsync(
|
||||||
'git clone; git push origin :foo',
|
'git clone; git push origin :foo',
|
||||||
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
||||||
|
@ -325,7 +325,7 @@ describe('Git Remotes', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('makes a new branch from pull and doesnt bork', function() {
|
it('makes a new branch from pull and doesn\'t bork', function() {
|
||||||
expectTreeAsync(
|
expectTreeAsync(
|
||||||
'git clone; git pull origin :bar',
|
'git clone; git pull origin :bar',
|
||||||
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null},"bar":{"target":"C1","id":"bar","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null},"bar":{"target":"C1","id":"bar","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
||||||
|
|
|
@ -165,7 +165,7 @@ var initRootEvents = function(eventBaton) {
|
||||||
var initDemo = function(sandbox) {
|
var initDemo = function(sandbox) {
|
||||||
var params = util.parseQueryString(window.location.href);
|
var params = util.parseQueryString(window.location.href);
|
||||||
|
|
||||||
// being the smart programmer I am (not), I dont include a true value on demo, so
|
// being the smart programmer I am (not), I don't include a true value on demo, so
|
||||||
// I have to check if the key exists here
|
// I have to check if the key exists here
|
||||||
var commands;
|
var commands;
|
||||||
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ var commandConfigs = {
|
||||||
var commands = {
|
var commands = {
|
||||||
execute: function(vcs, name, engine, commandObj) {
|
execute: function(vcs, name, engine, commandObj) {
|
||||||
if (!commandConfigs[vcs][name]) {
|
if (!commandConfigs[vcs][name]) {
|
||||||
throw new Error('i dont have a command for ' + name);
|
throw new Error('i don\'t have a command for ' + name);
|
||||||
}
|
}
|
||||||
var config = commandConfigs[vcs][name];
|
var config = commandConfigs[vcs][name];
|
||||||
if (config.delegate) {
|
if (config.delegate) {
|
||||||
|
|
|
@ -107,7 +107,7 @@ var assertBranchIsRemoteTracking = function(engine, branchName) {
|
||||||
if (!tracking) {
|
if (!tracking) {
|
||||||
throw new GitError({
|
throw new GitError({
|
||||||
msg: intl.todo(
|
msg: intl.todo(
|
||||||
branchName + ' is not a remote tracking branch! I dont know where to push'
|
branchName + ' is not a remote tracking branch! I don\'t know where to push'
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -519,7 +519,7 @@ var commandConfig = {
|
||||||
command.addWarning(
|
command.addWarning(
|
||||||
intl.str('git-warning-hard')
|
intl.str('git-warning-hard')
|
||||||
);
|
);
|
||||||
// dont absorb the arg off of --hard
|
// don't absorb the arg off of --hard
|
||||||
generalArgs = generalArgs.concat(commandOptions['--hard']);
|
generalArgs = generalArgs.concat(commandOptions['--hard']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ function getMockFactory() {
|
||||||
};
|
};
|
||||||
|
|
||||||
mockFactory.highlightEachWithPromise = function(chain, toRebase, destBranch) {
|
mockFactory.highlightEachWithPromise = function(chain, toRebase, destBranch) {
|
||||||
// dont add any steps
|
// don't add any steps
|
||||||
return chain;
|
return chain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ GitEngine.prototype.initUniqueID = function() {
|
||||||
|
|
||||||
GitEngine.prototype.handleModeChange = function(vcs, callback) {
|
GitEngine.prototype.handleModeChange = function(vcs, callback) {
|
||||||
if (this.mode === vcs) {
|
if (this.mode === vcs) {
|
||||||
// dont fire event aggressively
|
// don't fire event aggressively
|
||||||
callback();
|
callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +96,8 @@ GitEngine.prototype.setMode = function(vcs) {
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
var chain = deferred.promise;
|
var chain = deferred.promise;
|
||||||
|
|
||||||
// this stuff is tricky because we dont animate when
|
// this stuff is tricky because we don't animate when
|
||||||
// we didnt do anything, but we DO animate when
|
// we didn't do anything, but we DO animate when
|
||||||
// either of the operations happen. so a lot of
|
// either of the operations happen. so a lot of
|
||||||
// branching ahead...
|
// branching ahead...
|
||||||
var neededUpdate = this.updateAllBranchesForHg();
|
var neededUpdate = this.updateAllBranchesForHg();
|
||||||
|
@ -318,7 +318,7 @@ GitEngine.prototype.instantiateFromTree = function(tree) {
|
||||||
|
|
||||||
if (tree.originTree) {
|
if (tree.originTree) {
|
||||||
var treeString = JSON.stringify(tree.originTree);
|
var treeString = JSON.stringify(tree.originTree);
|
||||||
// if we dont have an animation queue (like when loading
|
// if we don't have an animation queue (like when loading
|
||||||
// right away), just go ahead and make an empty one
|
// right away), just go ahead and make an empty one
|
||||||
this.animationQueue = this.animationQueue || new AnimationQueue({
|
this.animationQueue = this.animationQueue || new AnimationQueue({
|
||||||
callback: function() {}
|
callback: function() {}
|
||||||
|
@ -434,7 +434,7 @@ GitEngine.prototype.findCommonAncestorForRemote = function(myTarget) {
|
||||||
return this.getCommonAncestor(
|
return this.getCommonAncestor(
|
||||||
leftTarget,
|
leftTarget,
|
||||||
rightTarget,
|
rightTarget,
|
||||||
true // dont throw since we dont know the order here.
|
true // don't throw since we don't know the order here.
|
||||||
).get('id');
|
).get('id');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ GitEngine.prototype.findCommonAncestorWithRemote = function(originTarget) {
|
||||||
// Like above, could have two parents
|
// Like above, could have two parents
|
||||||
var leftTarget = this.findCommonAncestorWithRemote(parents[0].get('id'));
|
var leftTarget = this.findCommonAncestorWithRemote(parents[0].get('id'));
|
||||||
var rightTarget = this.findCommonAncestorWithRemote(parents[1].get('id'));
|
var rightTarget = this.findCommonAncestorWithRemote(parents[1].get('id'));
|
||||||
return this.getCommonAncestor(leftTarget, rightTarget, true /* dont throw */).get('id');
|
return this.getCommonAncestor(leftTarget, rightTarget, true /* don't throw */).get('id');
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.makeBranchOnOriginAndTrack = function(branchName, target) {
|
GitEngine.prototype.makeBranchOnOriginAndTrack = function(branchName, target) {
|
||||||
|
@ -1113,7 +1113,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
if (!commitsToMake.length) {
|
if (!commitsToMake.length) {
|
||||||
if (!options.force) {
|
if (!options.force) {
|
||||||
// We are already up to date, and we cant be deleting
|
// We are already up to date, and we cant be deleting
|
||||||
// either since we dont have --force
|
// either since we don't have --force
|
||||||
throw new GitError({
|
throw new GitError({
|
||||||
msg: intl.str('git-error-origin-fetch-uptodate')
|
msg: intl.str('git-error-origin-fetch-uptodate')
|
||||||
});
|
});
|
||||||
|
@ -1133,7 +1133,7 @@ GitEngine.prototype.push = function(options) {
|
||||||
|
|
||||||
// now here is the tricky part -- the difference between local master
|
// now here is the tricky part -- the difference between local master
|
||||||
// and remote master might be commits C2, C3, and C4, but the remote
|
// and remote master might be commits C2, C3, and C4, but the remote
|
||||||
// might already have those commits. In this case, we dont need to
|
// might already have those commits. In this case, we don't need to
|
||||||
// make them, so filter these out
|
// make them, so filter these out
|
||||||
commitsToMake = _.filter(commitsToMake, function(commitJSON) {
|
commitsToMake = _.filter(commitsToMake, function(commitJSON) {
|
||||||
return !this.origin.refs[commitJSON.id];
|
return !this.origin.refs[commitJSON.id];
|
||||||
|
@ -1307,7 +1307,7 @@ GitEngine.prototype.fetchCore = function(sourceDestPairs, options) {
|
||||||
|
|
||||||
// now here is the tricky part -- the difference between local master
|
// now here is the tricky part -- the difference between local master
|
||||||
// and remote master might be commits C2, C3, and C4, but we
|
// and remote master might be commits C2, C3, and C4, but we
|
||||||
// might already have those commits. In this case, we dont need to
|
// might already have those commits. In this case, we don't need to
|
||||||
// make them, so filter these out
|
// make them, so filter these out
|
||||||
commitsToMake = _.filter(commitsToMake, function(commitJSON) {
|
commitsToMake = _.filter(commitsToMake, function(commitJSON) {
|
||||||
return !this.refs[commitJSON.id];
|
return !this.refs[commitJSON.id];
|
||||||
|
@ -1617,7 +1617,7 @@ GitEngine.prototype.resolveName = function(someRef) {
|
||||||
|
|
||||||
GitEngine.prototype.resolveID = function(idOrTarget) {
|
GitEngine.prototype.resolveID = function(idOrTarget) {
|
||||||
if (idOrTarget === null || idOrTarget === undefined) {
|
if (idOrTarget === null || idOrTarget === undefined) {
|
||||||
throw new Error('Dont call this with null / undefined');
|
throw new Error('Don\'t call this with null / undefined');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof idOrTarget !== 'string') {
|
if (typeof idOrTarget !== 'string') {
|
||||||
|
@ -1823,7 +1823,7 @@ GitEngine.prototype.pruneTreeAndPlay = function() {
|
||||||
|
|
||||||
GitEngine.prototype.pruneTree = function() {
|
GitEngine.prototype.pruneTree = function() {
|
||||||
var set = this.getUpstreamBranchSet();
|
var set = this.getUpstreamBranchSet();
|
||||||
// dont prune commits that HEAD depends on
|
// don't prune commits that HEAD depends on
|
||||||
var headSet = Graph.getUpstreamSet(this, 'HEAD');
|
var headSet = Graph.getUpstreamSet(this, 'HEAD');
|
||||||
_.each(headSet, function(val, commitID) {
|
_.each(headSet, function(val, commitID) {
|
||||||
set[commitID] = true;
|
set[commitID] = true;
|
||||||
|
@ -2238,7 +2238,7 @@ GitEngine.prototype.rebaseInteractiveTest = function(targetSource, currentLocati
|
||||||
|
|
||||||
if (extraCommits.length > 0) {
|
if (extraCommits.length > 0) {
|
||||||
throw new GitError({
|
throw new GitError({
|
||||||
msg: intl.todo('Hey those commits dont exist in the set!')
|
msg: intl.todo('Hey those commits don\'t exist in the set!')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2290,7 +2290,7 @@ GitEngine.prototype.rebaseInteractive = function(targetSource, currentLocation,
|
||||||
_.each(options.initialCommitOrdering[0].split(','), function(id) {
|
_.each(options.initialCommitOrdering[0].split(','), function(id) {
|
||||||
if (!rebaseMap[id]) {
|
if (!rebaseMap[id]) {
|
||||||
throw new GitError({
|
throw new GitError({
|
||||||
msg: intl.todo('Hey those commits dont exist in the set!')
|
msg: intl.todo('Hey those commits don\'t exist in the set!')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
initialCommitOrdering.push(id);
|
initialCommitOrdering.push(id);
|
||||||
|
@ -2326,7 +2326,7 @@ GitEngine.prototype.filterRebaseCommits = function(
|
||||||
}
|
}
|
||||||
|
|
||||||
// we ALSO need to throw out commits that will do the same changes. like
|
// we ALSO need to throw out commits that will do the same changes. like
|
||||||
// if the upstream set has a commit C4 and we have C4', we dont rebase the C4' again.
|
// if the upstream set has a commit C4 and we have C4', we don't rebase the C4' again.
|
||||||
var baseID = this.scrapeBaseID(commit.get('id'));
|
var baseID = this.scrapeBaseID(commit.get('id'));
|
||||||
if (changesAlreadyMade[baseID]) {
|
if (changesAlreadyMade[baseID]) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -2787,7 +2787,7 @@ GitEngine.prototype.log = function(ref, omitSet) {
|
||||||
|
|
||||||
GitEngine.prototype.getCommonAncestor = function(ancestor, cousin, dontThrow) {
|
GitEngine.prototype.getCommonAncestor = function(ancestor, cousin, dontThrow) {
|
||||||
if (this.isUpstreamOf(cousin, ancestor) && !dontThrow) {
|
if (this.isUpstreamOf(cousin, ancestor) && !dontThrow) {
|
||||||
throw new Error('Dont use common ancestor if we are upstream!');
|
throw new Error('Don\'t use common ancestor if we are upstream!');
|
||||||
}
|
}
|
||||||
|
|
||||||
var upstreamSet = Graph.getUpstreamSet(this, ancestor);
|
var upstreamSet = Graph.getUpstreamSet(this, ancestor);
|
||||||
|
|
|
@ -271,7 +271,7 @@ var LevelBuilder = Level.extend({
|
||||||
this.startDialogObj = levelObj;
|
this.startDialogObj = levelObj;
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
// nothing to do, they dont want to edit it apparently
|
// nothing to do, they don't want to edit it apparently
|
||||||
})
|
})
|
||||||
.done(function() {
|
.done(function() {
|
||||||
if (command) {
|
if (command) {
|
||||||
|
@ -340,7 +340,7 @@ var LevelBuilder = Level.extend({
|
||||||
return whenEditedDialog.promise;
|
return whenEditedDialog.promise;
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
// if they dont want to edit the start dialog, do nothing
|
// if they don't want to edit the start dialog, do nothing
|
||||||
})
|
})
|
||||||
.done(function() {
|
.done(function() {
|
||||||
askForStartDeferred.resolve();
|
askForStartDeferred.resolve();
|
||||||
|
@ -385,14 +385,14 @@ var LevelBuilder = Level.extend({
|
||||||
'help builder': LevelBuilder.__super__.startDialog
|
'help builder': LevelBuilder.__super__.startDialog
|
||||||
};
|
};
|
||||||
if (!methodMap[command.get('method')]) {
|
if (!methodMap[command.get('method')]) {
|
||||||
throw new Error('woah we dont support that method yet');
|
throw new Error('woah we don\'t support that method yet');
|
||||||
}
|
}
|
||||||
|
|
||||||
methodMap[command.get('method')].apply(this, arguments);
|
methodMap[command.get('method')].apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
afterCommandDefer: function(defer, command) {
|
afterCommandDefer: function(defer, command) {
|
||||||
// we dont need to compare against the goal anymore
|
// we don't need to compare against the goal anymore
|
||||||
defer.resolve();
|
defer.resolve();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -401,7 +401,7 @@ var Level = Sandbox.extend({
|
||||||
|
|
||||||
doesCommandCountTowardsTotal: function(command) {
|
doesCommandCountTowardsTotal: function(command) {
|
||||||
if (command.get('error')) {
|
if (command.get('error')) {
|
||||||
// dont count errors towards our count
|
// don't count errors towards our count
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ var Level = Sandbox.extend({
|
||||||
};
|
};
|
||||||
var method = methodMap[command.get('method')];
|
var method = methodMap[command.get('method')];
|
||||||
if (!method) {
|
if (!method) {
|
||||||
throw new Error('woah we dont support that method yet', method);
|
throw new Error('woah we don\'t support that method yet', method);
|
||||||
}
|
}
|
||||||
|
|
||||||
method.apply(this, [command, defer]);
|
method.apply(this, [command, defer]);
|
||||||
|
|
|
@ -27,7 +27,7 @@ ParseWaterfall.prototype.initParseWaterfall = function() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// by deferring the initialization here, we dont require()
|
// by deferring the initialization here, we don't require()
|
||||||
// level too early (which barfs our init)
|
// level too early (which barfs our init)
|
||||||
this.parseWaterfall = this.options.parseWaterfall || [
|
this.parseWaterfall = this.options.parseWaterfall || [
|
||||||
Commands.parse,
|
Commands.parse,
|
||||||
|
|
|
@ -43,7 +43,7 @@ var Command = Backbone.Model.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
initDefaults: function() {
|
initDefaults: function() {
|
||||||
// weird things happen with defaults if you dont
|
// weird things happen with defaults if you don't
|
||||||
// make new objects
|
// make new objects
|
||||||
this.set('generalArgs', []);
|
this.set('generalArgs', []);
|
||||||
this.set('supportedMap', {});
|
this.set('supportedMap', {});
|
||||||
|
|
|
@ -76,7 +76,7 @@ EventBaton.prototype.passBatonBack = function(name, func, context, args) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (indexBefore === undefined) {
|
if (indexBefore === undefined) {
|
||||||
throw new Error('you are the last baton holder! or i didnt find you');
|
throw new Error('you are the last baton holder! or i didn\'t find you');
|
||||||
}
|
}
|
||||||
var toCallObj = listeners[indexBefore];
|
var toCallObj = listeners[indexBefore];
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ EventBaton.prototype.releaseBaton = function(name, func, context) {
|
||||||
if (!found) {
|
if (!found) {
|
||||||
console.log('did not find that function', func, context, name, arguments);
|
console.log('did not find that function', func, context, name, arguments);
|
||||||
console.log(this.eventMap);
|
console.log(this.eventMap);
|
||||||
throw new Error('cant releasebaton if yu dont have it');
|
throw new Error('cant releasebaton if yu don\'t have it');
|
||||||
}
|
}
|
||||||
this.eventMap[name] = newListeners;
|
this.eventMap[name] = newListeners;
|
||||||
};
|
};
|
||||||
|
|
|
@ -334,7 +334,7 @@ var MultiViewBuilder = ContainedBase.extend({
|
||||||
this.addChildViewObj(newView);
|
this.addChildViewObj(newView);
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
// they dont want to add the view apparently, so just return
|
// they don't want to add the view apparently, so just return
|
||||||
})
|
})
|
||||||
.done();
|
.done();
|
||||||
},
|
},
|
||||||
|
|
|
@ -129,9 +129,9 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
|
|
||||||
positive: function() {
|
positive: function() {
|
||||||
if (this.demonstrated || !this.hasControl) {
|
if (this.demonstrated || !this.hasControl) {
|
||||||
// dont do anything if we are demonstrating, and if
|
// don't do anything if we are demonstrating, and if
|
||||||
// we receive a meta nav event and we aren't listening,
|
// we receive a meta nav event and we aren't listening,
|
||||||
// then dont do anything either
|
// then don't do anything either
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.demonstrated = true;
|
this.demonstrated = true;
|
||||||
|
|
|
@ -98,7 +98,7 @@ GitVisuals.prototype.resetAll = function() {
|
||||||
GitVisuals.prototype.tearDown = function() {
|
GitVisuals.prototype.tearDown = function() {
|
||||||
this.resetAll();
|
this.resetAll();
|
||||||
this.paper.remove();
|
this.paper.remove();
|
||||||
// Unregister the refresh tree listener so we dont accumulate
|
// Unregister the refresh tree listener so we don't accumulate
|
||||||
// these over time. However we aren't calling tearDown in
|
// these over time. However we aren't calling tearDown in
|
||||||
// some places... but this is an improvement
|
// some places... but this is an improvement
|
||||||
var Main = require('../app');
|
var Main = require('../app');
|
||||||
|
@ -442,7 +442,7 @@ GitVisuals.prototype.fullCalc = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
GitVisuals.prototype.calcTreeCoords = function() {
|
GitVisuals.prototype.calcTreeCoords = function() {
|
||||||
// this method can only contain things that dont rely on graphics
|
// this method can only contain things that don't rely on graphics
|
||||||
if (!this.rootCommit) {
|
if (!this.rootCommit) {
|
||||||
throw new Error('grr, no root commit!');
|
throw new Error('grr, no root commit!');
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ var VisBase = Backbone.Model.extend({
|
||||||
} else {
|
} else {
|
||||||
this.get(key).stop();
|
this.get(key).stop();
|
||||||
this.get(key).animate(attr[key], speed, easing);
|
this.get(key).animate(attr[key], speed, easing);
|
||||||
// some keys dont support animating too, so set those instantly here
|
// some keys don't support animating too, so set those instantly here
|
||||||
_.forEach(this.getNonAnimateKeys(), function(nonAnimateKey) {
|
_.forEach(this.getNonAnimateKeys(), function(nonAnimateKey) {
|
||||||
if (attr[key] && attr[key][nonAnimateKey] !== undefined) {
|
if (attr[key] && attr[key][nonAnimateKey] !== undefined) {
|
||||||
this.get(key).attr(nonAnimateKey, attr[key][nonAnimateKey]);
|
this.get(key).attr(nonAnimateKey, attr[key][nonAnimateKey]);
|
||||||
|
|
|
@ -407,7 +407,7 @@ var VisBranch = VisBase.extend({
|
||||||
var textPos = this.getTextPosition();
|
var textPos = this.getTextPosition();
|
||||||
var name = this.getName();
|
var name = this.getName();
|
||||||
|
|
||||||
// when from a reload, we dont need to generate the text
|
// when from a reload, we don't need to generate the text
|
||||||
var text = paper.text(textPos.x, textPos.y, String(name));
|
var text = paper.text(textPos.x, textPos.y, String(name));
|
||||||
text.attr({
|
text.attr({
|
||||||
'font-size': 14,
|
'font-size': 14,
|
||||||
|
|
|
@ -421,7 +421,7 @@ var VisNode = VisBase.extend({
|
||||||
});
|
});
|
||||||
// continuation calculation
|
// continuation calculation
|
||||||
if ((vx * vx + vy * vy) < 0.1 && Math.abs(y - maxHeight) <= 0.1) {
|
if ((vx * vx + vy * vy) < 0.1 && Math.abs(y - maxHeight) <= 0.1) {
|
||||||
// dont need to animate anymore, we are on ground
|
// don't need to animate anymore, we are on ground
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// keep animating!
|
// keep animating!
|
||||||
|
|
|
@ -251,7 +251,7 @@ var VisTag = VisBase.extend({
|
||||||
var textPos = this.getTextPosition();
|
var textPos = this.getTextPosition();
|
||||||
var name = this.getName();
|
var name = this.getName();
|
||||||
|
|
||||||
// when from a reload, we dont need to generate the text
|
// when from a reload, we don't need to generate the text
|
||||||
var text = paper.text(textPos.x, textPos.y, String(name));
|
var text = paper.text(textPos.x, textPos.y, String(name));
|
||||||
text.attr({
|
text.attr({
|
||||||
'font-size': 14,
|
'font-size': 14,
|
||||||
|
|
|
@ -34,7 +34,7 @@ var Visualization = Backbone.View.extend({
|
||||||
this.paper = paper;
|
this.paper = paper;
|
||||||
|
|
||||||
var Main = require('../app');
|
var Main = require('../app');
|
||||||
// if we dont want to receive keyboard input (directly),
|
// if we don't want to receive keyboard input (directly),
|
||||||
// make a new event baton so git engine steals something that no one
|
// make a new event baton so git engine steals something that no one
|
||||||
// is broadcasting to
|
// is broadcasting to
|
||||||
this.eventBaton = (options.noKeyboardInput) ?
|
this.eventBaton = (options.noKeyboardInput) ?
|
||||||
|
|
2
todo.txt
2
todo.txt
|
@ -77,7 +77,7 @@ Done things:
|
||||||
[x] git pull animation
|
[x] git pull animation
|
||||||
[x] use the graph difference algorithm to then implement git push
|
[x] use the graph difference algorithm to then implement git push
|
||||||
[x] work on git pull --rebase animation, send down the deferred and it should work?
|
[x] work on git pull --rebase animation, send down the deferred and it should work?
|
||||||
[x] why is rebase -i broken? dont emulate touch events
|
[x] why is rebase -i broken? don't emulate touch events
|
||||||
[x] tree compare test coverage
|
[x] tree compare test coverage
|
||||||
[x] remote branch it is tracking (points to a remote branch model)
|
[x] remote branch it is tracking (points to a remote branch model)
|
||||||
[x] fix branch -a and branch -r to: show remote branches or all branches
|
[x] fix branch -a and branch -r to: show remote branches or all branches
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue