summaryrefslogtreecommitdiff
path: root/github.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-09-14 11:05:57 +0200
committerGubolin <gubolin@fantasymail.de>2014-09-14 11:05:57 +0200
commit8e20460fed4f35b624b53f4a1ccb3dd48727d544 (patch)
tree421ec17a5845b9a0ac352775cfa1de7531fee3d2 /github.js
parent0e68efc8026aab552a6e5d36d8d8f49ad5b47e88 (diff)
downloadsnap-8e20460fed4f35b624b53f4a1ccb3dd48727d544.tar.gz
snap-8e20460fed4f35b624b53f4a1ccb3dd48727d544.zip
WIP
Diffstat (limited to 'github.js')
-rw-r--r--github.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/github.js b/github.js
index 3d46578..0dc6ab5 100644
--- a/github.js
+++ b/github.js
@@ -179,10 +179,14 @@ GitHubBackend.prototype.saveProject = function (commitMessage, parentCommitSha,
// diff parent <-> local
codePatch = dmp.patch_make(parentCode, localCode);
notePatch = dmp.patch_make(parentNotes, localNotes);
- console.log(dmp.patch_toText(codePatch));//DEBUG
+ console.log(JSON.stringify(codePatch));//DEBUG
// patch (parent<->local) => head
- localCode = dmp.patch_apply(codePatch, headCode)[0];
- localNotes = dmp.patch_apply(notePatch, headNotes)[0];
+ localCode = dmp.patch_apply(codePatch, headCode);
+ localNotes = dmp.patch_apply(notePatch, headNotes);
+ console.log('Code patched successfully? ' + localCode[1]);
+ console.log('Notes patched successfully? ' + localNotes[1]);
+ localCode = localCode[0];
+ localNotes = localNotes[0];
// perform a `git merge`
// TODO TODO TODO 422 Not a fast-forward