DESCRIPTION

Team > Create patch is missing 

The change adds the missing action. The action opens the Create Patch
wizard allowing to save changes from your working tree in a file or
clipboard.

Bug: 341036
Change-Id: Ib32830d732d31c1057ed7c969399f21223908b06


COMMENTS

author: Clay Cameron
date: 2011-12-15 11:20:11.000000000

Uploaded patch set 2.

-------------------------------------
author: Juliet Cantu
date: 2011-12-17 00:12:08.000000000

Patch Set 2: I would prefer that you didn't submit this

(4 inline comments)

The patch is not created as advertised. It creates a patch agains HEAD^, not HEAD.

-------------------------------------
author: Clay Cameron
date: 2011-12-19 11:39:53.000000000

Patch Set 2: (1 inline comment)

> It creates a patch agains HEAD^, not HEAD.

Sorry, but I cannot reproduce, it works fine to me. Could you send me a repo for which it doesn't work as expected.

Line:134, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CreatePatchOperation.java -> I agree that error handling can be improved but I don't think it should be part of this bug/change. I would like to keep it as small as possible. I'm fine with filing a separate bug for what you suggested and moving the discussion there. However, I would deal with IOException as suggested in the change if this is how it's currently done in EGit.

-------------------------------------
author: Juliet Cantu
date: 2011-12-23 11:51:45.000000000

Patch Set 2:

>Clay Cameron		Dec 19
>>Patch Set 2: (1 inline comment)
>>
>> It creates a patch agains HEAD^, not HEAD.
>
>Sorry, but I cannot reproduce, it works fine to me. Could >you send me a repo for which it doesn't work as expected.

It depends on the expectation. I interpret the explanation such that it would work as create patch with CVS, i.e. create a patch containing the uncommitted changes, however it creates a patch covering the latest *committed* changes.

-------------------------------------
author: Juliet Cantu
date: 2011-12-23 11:56:53.000000000

Patch Set 2: (1 inline comment)



Line:134, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CreatePatchOperation.java -> It can be fixed separately,

-------------------------------------
author: Clay Cameron
date: 2011-12-23 12:33:02.000000000

Patch Set 2:

I think I know what's the culprit of our confusion :) Are you using "Team > Create Patch..." action from Package Explorer to generate the patch? If you use the same action in the History view you will get a diff between the selected commit and its ancestor.

-------------------------------------
author: Juliet Cantu
date: 2011-12-17 00:12:07.000000000

MISMATCHED INLINE COMMENT
Line:29, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CreatePatchHandler.java -> fix indentation, includiing the line you didn't change

-------------------------------------
author: Juliet Cantu
date: 2011-12-17 00:12:07.000000000

MISMATCHED INLINE COMMENT
Line:225, org.eclipse.egit.ui/plugin.xml -> Fix indentation.

-------------------------------------
author: Juliet Cantu
date: 2011-12-17 00:12:07.000000000

MISMATCHED INLINE COMMENT
Line:134, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CreatePatchOperation.java -> I think we should start catching Exception here and similar places where we'd otherwise just fall off the end. 

Programming errors resulting in NPE or similar seems to be much more common than I/O exceptions.

Major rework like this constitutes a good time to improve error handling.

-------------------------------------
author: Juliet Cantu
date: 2011-12-17 00:12:07.000000000

MISMATCHED INLINE COMMENT
Line:21, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CreatePatchActionHandler.java -> fix indentation

-------------------------------------
