diff --git a/build/bundle.js b/build/bundle.js index 9b0a7a65..e005ddfe 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -8340,7 +8340,6 @@ GitEngine.prototype.rebase = function(targetSource, currentLocation) { // keep searching pQueue = pQueue.concat(popped.get('parents')); } - console.log('this is what our rebase rough array is', toRebaseRough); return this.rebaseFinish(toRebaseRough, stopSet, targetSource, currentLocation); }; @@ -8455,6 +8454,17 @@ GitEngine.prototype.rebaseFinish = function(toRebaseRough, stopSet, targetSource } }, this); + toRebaseRough = toRebase; + toRebase = []; + // finally, make the set unique + var uniqueIDs = {}; + _.each(toRebaseRough, function(commit) { + if (uniqueIDs[commit.get('id')]) { return; } + + uniqueIDs[commit.get('id')] = true; + toRebase.push(commit); + }, this); + if (!toRebase.length) { throw new GitError({ msg: 'No Commits to Rebase! Everything else is merge commits or changes already have been applied' @@ -19497,7 +19507,6 @@ GitEngine.prototype.rebase = function(targetSource, currentLocation) { // keep searching pQueue = pQueue.concat(popped.get('parents')); } - console.log('this is what our rebase rough array is', toRebaseRough); return this.rebaseFinish(toRebaseRough, stopSet, targetSource, currentLocation); }; @@ -19612,6 +19621,17 @@ GitEngine.prototype.rebaseFinish = function(toRebaseRough, stopSet, targetSource } }, this); + toRebaseRough = toRebase; + toRebase = []; + // finally, make the set unique + var uniqueIDs = {}; + _.each(toRebaseRough, function(commit) { + if (uniqueIDs[commit.get('id')]) { return; } + + uniqueIDs[commit.get('id')] = true; + toRebase.push(commit); + }, this); + if (!toRebase.length) { throw new GitError({ msg: 'No Commits to Rebase! Everything else is merge commits or changes already have been applied' diff --git a/src/js/git/index.js b/src/js/git/index.js index 0a970bea..75be16bb 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -977,7 +977,6 @@ GitEngine.prototype.rebase = function(targetSource, currentLocation) { // keep searching pQueue = pQueue.concat(popped.get('parents')); } - console.log('this is what our rebase rough array is', toRebaseRough); return this.rebaseFinish(toRebaseRough, stopSet, targetSource, currentLocation); }; @@ -1092,6 +1091,17 @@ GitEngine.prototype.rebaseFinish = function(toRebaseRough, stopSet, targetSource } }, this); + toRebaseRough = toRebase; + toRebase = []; + // finally, make the set unique + var uniqueIDs = {}; + _.each(toRebaseRough, function(commit) { + if (uniqueIDs[commit.get('id')]) { return; } + + uniqueIDs[commit.get('id')] = true; + toRebase.push(commit); + }, this); + if (!toRebase.length) { throw new GitError({ msg: 'No Commits to Rebase! Everything else is merge commits or changes already have been applied' diff --git a/todo.txt b/todo.txt index 060abca8..c8b556d3 100644 --- a/todo.txt +++ b/todo.txt @@ -4,9 +4,6 @@ Big Things [ ] import random level JSON [ ] export / import tree from JSON [ ] compare settings for a level!!! integrated into builder... -[ ] bug with weird tree string: - -"%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C7%27%22%2C%22id%22%3A%22master%22%7D%2C%22bugFix%22%3A%7B%22target%22%3A%22C2%27%22%2C%22id%22%3A%22bugFix%22%7D%2C%22side%22%3A%7B%22target%22%3A%22C6%27%22%2C%22id%22%3A%22side%22%7D%2C%22another%22%3A%7B%22target%22%3A%22C7%27%22%2C%22id%22%3A%22another%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C4%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C4%22%7D%2C%22C5%22%3A%7B%22parents%22%3A%5B%22C4%22%5D%2C%22id%22%3A%22C5%22%7D%2C%22C6%22%3A%7B%22parents%22%3A%5B%22C5%22%5D%2C%22id%22%3A%22C6%22%7D%2C%22C7%22%3A%7B%22parents%22%3A%5B%22C5%22%5D%2C%22id%22%3A%22C7%22%7D%2C%22C2%27%22%3A%7B%22parents%22%3A%5B%22C3%22%5D%2C%22id%22%3A%22C2%27%22%7D%2C%22C4%27%22%3A%7B%22parents%22%3A%5B%22C2%27%22%5D%2C%22id%22%3A%22C4%27%22%7D%2C%22C5%27%22%3A%7B%22parents%22%3A%5B%22C4%27%22%5D%2C%22id%22%3A%22C5%27%22%7D%2C%22C6%27%22%3A%7B%22parents%22%3A%5B%22C5%27%22%5D%2C%22id%22%3A%22C6%27%22%7D%2C%22C7%27%22%3A%7B%22parents%22%3A%5B%22C6%27%22%5D%2C%22id%22%3A%22C7%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22master%22%2C%22id%22%3A%22HEAD%22%7D%7D" Medium things: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -24,7 +21,6 @@ Minor Bugs to fix: Big Bugs to fix: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -[ ] rebase bug... ugh Ideas for cleaning ~~~~~~~~~~~~~ @@ -33,6 +29,8 @@ Ideas for cleaning Done things: (I only started this on Dec 17th 2012 to get a better sense of what was done) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[x] rebase bug... ugh +[x] bug with weird tree string: [x] optimistic parsing of level and level builder commands, man that was toughwith circular imports [x] edit dialog [x] level builder dialog builder