Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » What should Team > Create patch do? Does EGit supply it?(Don't understand how to use Team > Create patch ?)
icon5.gif  What should Team > Create patch do? Does EGit supply it? [message #1753903] Sun, 12 February 2017 05:06 Go to next message
Jim DeLaHunt is currently offline Jim DeLaHuntFriend
Messages: 7
Registered: March 2014
Location: Vancouver, Canada
Junior Member

Hello, everyone:

I am using EGit with LiClipse, an Eclipse derivative. I am trying to move changes from one Git repository using patches.

When I open my repository in "PyDev Package Explorer" view, and I click on the project's top-level node or any node in the project, a pop-up menu appears. This menu includes a Team > menu. The Team > menu has entries "Merge tool", "Show local history", "Ignore", "Commit", "Repository >", "Advanced >", "Create patch...", "Apply patch...", "Show in History", "Show in Repository View", "Show annotations".

Am I right in believing that EGit supplies the Team > menu?

In the EGit User Guide, I see references to various items that resemble Team > menu items, but I don't see any forthright statement that "EGit provides a Team > menu on project nodes, here are the items in that menu, here is what each item does".

I read the User Guide section on patches. I see discussion of how to create patches from the History view, using a different menu than the Team > menu. I don't see any discussion about how to either create or apply patches from the Team > menu.

When I select the Team > Create patch... from a project node, I get an error dialogue box, "Cannot create patch. There are no changes in the workspace for the current selection. [OK]" I don't see anything in the EGit User Guide explaining what are the "changes in the workspace" to which this message refers.

What should the Team > Create patch... menu item do? Should it do something useful in current EGit?

My LiClipse IDE is based on Eclipse Platform 4.6.1.v20160907-1200, with Eclipse Git Team Provider I am on Mac OS X 10.10.5.

--Jim DeLaHunt, multilingual websites consultant, Vancouver Canada
Running Liclipse. Coding in Python, SQL, PHP, Prolog.
Re: What should Team > Create patch do? Does EGit supply it? [message #1755278 is a reply to message #1753903] Wed, 01 March 2017 22:26 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1138
Registered: July 2009
Senior Member
Team > Create patch provides two patch styles on projects shared with EGit:
git style patches are implemented by EGit, Eclipse workspace style patches are also available on projects not shared with the git team provider.

Create patch on a project managed using EGit creates a patch file for modifications not yet committed. E.g. you may edit some file in a project versioned using EGit,
save the editor, then run Team > Create Patch, select where to store the patch e.g. Clipboard, select git style patch and then finish.
Paste the clipboard to a text editor to see the patch. Alternatively store the patch in the file system.

You can move around this patch file e.g. send it to a colleague via email, and he can apply the patch if he has another version of the same project.
If his version is very different from the version your modifications were based on it may happen that the patch can't be cleanly applied since context
lines around the lines you modified can't be matched between the two versions.
Previous Topic:Git Pull?
Next Topic:Why doesn't my patch work?
Goto Forum:

Current Time: Tue Jun 02 15:53:39 GMT 2020

Powered by FUDForum. Page generated in 0.01431 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top