Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 508585

Summary: Squashing unimplemented in Node
Product: [ECD] Orion Reporter: Remy Suen <remy.suen>
Component: GitAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: steve_northover
Version: 13.0   
Target Milestone: 15.0   
Hardware: All   
OS: All   
Whiteboard:

Description Remy Suen CLA 2016-12-02 04:26:15 EST
orion.eclipse.org

1. Ensure you have no incoming or outgoing changes.
2. Open the 'Git' page.
3. Click the right 'Squash the content of the branch to the index' tool item in the 'Incoming (0)' tree node.
4. Nothing will happen. Check your console logs for an error.

The merge(*) function isn't fully implemented in commit.js.

xhr.js:175 POST http://localhost:8081/gitapi/commit/HEAD/file 400 (Not implemented yet)
_xhr @ xhr.js:175
doMerge @ gitClient.js:647
(anonymous function) @ serviceregistry.js:147
callback @ gitCommands.js:817
_collectAndInvoke @ commandRegistry.js:451
_invoke @ commandRegistry.js:391
onClick @ commandRegistry.js:1260
done @ commands.js:415
onClickThen @ commands.js:447
(anonymous function) @ commands.js:456
Comment 1 Steve Northover CLA 2017-03-30 16:41:19 EDT
The first thing to do is disable/hide the feature in the UI when we are running Node.  Next, we should look into whether there is an implementation of squash we can use in nodegit.
Comment 2 Remy Suen CLA 2017-04-05 06:55:25 EDT
(In reply to Steve Northover from comment #1)
> The first thing to do is disable/hide the feature in the UI when we are
> running Node.

I didn't think there was a way for the client to randomly retrieve information about the server...
Comment 3 Remy Suen CLA 2017-04-06 05:52:56 EDT
(In reply to Steve Northover from comment #1)
> Next, we should look into whether there is an implementation
> of squash we can use in nodegit.

NodeGit doesn't provide such a convenience API. I wrote my own implementation instead and pushed it to master.

https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a5eac5b5cf20824920da6f2862dbd351da003053