diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-09-12 19:54:58 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-09-12 19:54:58 +0200 |
| commit | 0772e7d750532a91fc89c9bb131229a7fb989b91 (patch) | |
| tree | 0169c343a399cb2d3d7faa84518d798fe4b50f16 /gui.js | |
| parent | 39a50e190ac39560564507399d26fe7c141de86f (diff) | |
| download | snap-0772e7d750532a91fc89c9bb131229a7fb989b91.tar.gz snap-0772e7d750532a91fc89c9bb131229a7fb989b91.zip | |
support merging [WIP]
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -221,6 +221,8 @@ IDE_Morph.prototype.init = function (isAutoFill) { this.stageRatio = 1; // for IDE animations, e.g. when zooming this.loadNewProject = false; // flag when starting up translated + this.parentCommitSha = null; // for GitHub + this.lastCommit = null; // for GitHub this.shield = null; // initialize inherited properties: @@ -401,13 +403,15 @@ IDE_Morph.prototype.openIn = function (world) { GitHub.getProject( dict.Username, dict.projectName, - function (code) { + function (code, pcSha) { var msg; myself.nextSteps([ function () { msg = myself.showMessage('Opening GitHub project...'); }, function () { + myself.parentCommitSha = pcSha; + myself.lastCommit = code; myself.rawOpenCloudDataString(code); myself.hasChangedMedia = true; }, @@ -3935,13 +3939,17 @@ IDE_Morph.prototype.saveProjectToGitHub = function (name, commitMessage) { this.setProjectName(name); GitHub.saveProject( commitMessage, + this.parentCommitSha, + this.lastCommit, this, function () { GitHub.getProject( GitHub.username, name, - function (code) { + function (code, pcSha) { myself.source = 'github'; + myself.parentCommitSha = pcSha; + myself.lastCommit = code; myself.droppedText(code); }, myself.githubError() @@ -5072,8 +5080,10 @@ ProjectDialogMorph.prototype.rawOpenGitHubProject = function (proj, user) { GitHub.getProject( user, proj.ProjectName, - function (code) { + function (code, pcSha) { myself.ide.source = 'github'; + myself.ide.parentCommitSha = pcSha; + myself.ide.lastCommit = code; myself.ide.droppedText(code); }, myself.ide.githubError() @@ -5171,6 +5181,8 @@ ProjectDialogMorph.prototype.saveGitHubProject = function () { this.ide.showMessage('Committing project\nto GitHub...'); GitHub.saveProject( null, + this.ide.parentCommitSha, + this.ide.lastCommit, this.ide, function () { myself.ide.source = 'github'; |
