From 6989fb2894244ffcd1244c2a62ea3655ad8d3feb Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Jan 2021 14:21:23 +0100 Subject: [PATCH 1/3] Finals changes from In-App-Documentation branch. --- ...ching-branches-current-branch-changed.json | 25 +++++++++++++++++++ ...branches-contributions-branch-changed.json | 8 +++--- ...g-branches-current-branch-not-changed.json | 16 ++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-002-switching-branches-current-branch-changed.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-004-switching-branches-current-branch-not-changed.json diff --git a/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-002-switching-branches-current-branch-changed.json b/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-002-switching-branches-current-branch-changed.json new file mode 100644 index 000000000..09033e94b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-002-switching-branches-current-branch-changed.json @@ -0,0 +1,25 @@ +{ + "topic": "Branches Management Messages", + "pageNumber": "2", + "type": "Switching Branches - Current Branch Changed", + "definition": { + "text": "You are now standing at the new Current Branch, but the App is still running the code of the previous branch. To finish this process you need to restart the Superalgos Client and reload the UI. ", + "updated": 1610543555871 + }, + "paragraphs": [ + { + "style": "Success", + "text": "Also remeber that if you have tasks running at the same machine where the Superalgos Client is, they are still running the previous branch code. You need to restart them too after you restart the client.", + "updated": 1610543634663 + }, + { + "style": "Success", + "text": "Even though you are standing in a different branch now, that does not mean that this branch is up-to-date with the latest changes made by other contributors. To update it, please run the App Update Command." + }, + { + "style": "Note", + "text": " This change does not affet other nodes running Superalgos. The only one affected is the one you are connecting to with the UI.", + "updated": 1610543958104 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-003-switching-branches-contributions-branch-changed.json b/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-003-switching-branches-contributions-branch-changed.json index 0e61c965d..e3b69611c 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-003-switching-branches-contributions-branch-changed.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-003-switching-branches-contributions-branch-changed.json @@ -3,12 +3,14 @@ "pageNumber": "3", "type": "Switching Branches - Contributions Branch Changed", "definition": { - "text": "Write here a summary for this topic page." + "text": "Your Contributions Branch was succesfully changed. This will only have an inpact the next time you run the App Contribute Command. This branch is going to receive the Pull Request with all your changes.", + "updated": 1610543909026 }, "paragraphs": [ { - "style": "Text", - "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + "style": "Note", + "text": "There is no further action required.", + "updated": 1610543930216 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-004-switching-branches-current-branch-not-changed.json b/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-004-switching-branches-current-branch-not-changed.json new file mode 100644 index 000000000..981b84428 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/branches-management-messages-004-switching-branches-current-branch-not-changed.json @@ -0,0 +1,16 @@ +{ + "topic": "Branches Management Messages", + "pageNumber": "4", + "type": "Switching Branches - Current Branch Not Changed", + "definition": { + "text": "It was not possible to change the current branch. The most likely cause is that you have changes that you have not contribute yet. Run the App Contribute Command to send those changes to the main repository and try this command again.", + "updated": 1610543788194 + }, + "paragraphs": [ + { + "style": "Note", + "text": "More detailed info of what caused this failure to switch can be find at the Client's Console.", + "updated": 1610543823314 + } + ] +} \ No newline at end of file From 0d073ed8294273aa32ee6ce6e87cb968b4027c7c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Jan 2021 14:25:38 +0100 Subject: [PATCH 2/3] Finals changes from In-App-Documentation branch. --- Client/httpInterface.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 515bef9fc..bf6c934af 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -553,9 +553,14 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE } const git = simpleGit(options) - await git.add('./*') - await git.commit(commitMessage) - await git.push('origin', branch) + try { + await git.add('./*') + await git.commit(commitMessage) + await git.push('origin', branch) + } catch(err) { + console.log('[ERROR] Error running Contribute.') + console.log(err.stack) + } } async function doGithub() { From 161e57af504f2a1adfded4fc91ff898341d44abd Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Jan 2021 14:27:05 +0100 Subject: [PATCH 3/3] Update httpInterface.js --- Client/httpInterface.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index bf6c934af..1defbaedf 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -556,10 +556,11 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE try { await git.add('./*') await git.commit(commitMessage) - await git.push('origin', branch) + await git.push('origin', currentBranch) } catch(err) { console.log('[ERROR] Error running Contribute.') console.log(err.stack) + throw (err) } }