Show "Create Patch..." context menu entry in history view
commit2dbf8ddec4a9a59954a68b7bccdfd089ef84886f
authorStefan Lay <stefan.lay@sap.com>
Tue, 11 May 2010 15:40:16 +0000 (11 17:40 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 11 May 2010 22:58:44 +0000 (12 00:58 +0200)
tree3be35b62a02f024bad8077bc43723a0bda9e5c54
parentb9dca109a8302e5e7237fe00efe60f467364b378
Show "Create Patch..." context menu entry in history view

The menu entry is shown in history view and not in the package
explorer as in CVS. The reason is that when you use a distributed
versioning system you normally commit your local changes
to a local branch before you create a patch.

When one commit is selected in the commit list, the diff to
its parent can be saved to a file or stored in the clipboard.

The file filter of the history view is used.

It is not possible to create patch files for the first commit and
for merge commits.

Per default the wizard creates a patch with a format which can
be applied with the eclipse apply patch wizard:  The paths to the
files have no prefixes (as with git format-patch --no-prefix) and
they are relative to the eclipse project and not to the repository.

There is an option to create a patch which can be applied with
"git apply" on the command line (Not yet in eclipse.).
There may be more options in the future on the Options page.
Before more options are offered the diff rendering code should
be moved to jgit.

[ms]
- fixed some style nits
- reduced initial wizard height

Bug: 297636
Change-Id: I8d53a4c7685df75887ad6ec80aeda22dbb31e01f
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitMessageViewer.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiff.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitCreatePatchWizard.java [new file with mode: 0644]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties