summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-09-13 19:15:59 +0200
committerGubolin <gubolin@fantasymail.de>2014-09-13 19:15:59 +0200
commitf4c608fac563745ca2915d7a6373500696e5f214 (patch)
treedae52468fa3b9b4b578095db27cdf6a279e37b66 /gui.js
parent39a50e190ac39560564507399d26fe7c141de86f (diff)
downloadsnap-f4c608fac563745ca2915d7a6373500696e5f214.tar.gz
snap-f4c608fac563745ca2915d7a6373500696e5f214.zip
octokit->octokat, diff-merge->google-diff-match-patch-js
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/gui.js b/gui.js
index 6ae7222..45cf3f3 100644
--- a/gui.js
+++ b/gui.js
@@ -221,6 +221,7 @@ 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.shield = null;
// initialize inherited properties:
@@ -401,13 +402,14 @@ 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.rawOpenCloudDataString(code);
myself.hasChangedMedia = true;
},
@@ -3935,13 +3937,15 @@ IDE_Morph.prototype.saveProjectToGitHub = function (name, commitMessage) {
this.setProjectName(name);
GitHub.saveProject(
commitMessage,
+ this.parentCommitSha,
this,
function () {
GitHub.getProject(
GitHub.username,
name,
- function (code) {
+ function (code, pcSha) {
myself.source = 'github';
+ myself.parentCommitSha = pcSha;
myself.droppedText(code);
},
myself.githubError()
@@ -5072,8 +5076,9 @@ 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.droppedText(code);
},
myself.ide.githubError()
@@ -5171,6 +5176,7 @@ ProjectDialogMorph.prototype.saveGitHubProject = function () {
this.ide.showMessage('Committing project\nto GitHub...');
GitHub.saveProject(
null,
+ this.ide.parentCommitSha,
this.ide,
function () {
myself.ide.source = 'github';