4

PHPStorm will create patch in this form:

Index: core/modules/node/templates/node-edit-form.html.twig
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/modules/node/templates/node-edit-form.html.twig    (revision 4652b443e9f89734487e225fb76829595b5239a1)
+++ core/modules/node/templates/node-edit-form.html.twig    (revision )
@@ -1,6 +1,8 @@
 {#
 /**
  * @file
+ * Default theme implementation for a node edit form.
+ *
  * Two column template for the node add/edit form.
  *
  * This template will be used when a node edit form specifies 'node_edit_form'

After I export it I always have to remove the header and add the a/.. and b/.. prefixes and convert to LF so it'll look like this:

--- a/core/modules/node/templates/node-edit-form.html.twig
+++ b/core/modules/node/templates/node-edit-form.html.twig
@@ -1,6 +1,8 @@
 {#
 /**
  * @file
+ * Default theme implementation for a node edit form.
+ *
  * Two column template for the node add/edit form.
  *
  * This template will be used when a node edit form specifies 'node_edit_form'

Is there a way to export patch that I can directly use for drupal.org?

1
  • I don't get the close vote on this. PHPStorm is a tool used for Drupal, so this is on-topic.
    – mpdonadio
    Commented May 2, 2014 at 14:21

1 Answer 1

8

PHPStorm patching issues have a long history. I have corresponded with their staff more than once, about a year ago. They told me then, that my issue was taken up to developers, but never actually corrected it. Right now, PHPStorm issues patches incompatible with Drupal.org, and we can do nothing about it.

To create a working legit patch, you need git, and create a patch like this:

git diff > patch_name.patch

See http://drupal.org/node/707484

A number of PHP Storm request related to this issue have been merged into a single issue http://youtrack.jetbrains.com/issue/IDEA-92793

5
  • Is this PHPStorm's fault or does Drupal.org have special requirements for patch format?
    – user21641
    Commented May 2, 2014 at 10:17
  • PHPStorm's. Drupal.org uses a standard git patch format. Commented May 2, 2014 at 12:07
  • I couldn't find any issues in the phpstorm issue tracker for this so I went ahead and created an issue for it. Please go vote for this issue: youtrack.jetbrains.com/issue/WI-23407
    – Mixologic
    Commented May 21, 2014 at 15:55
  • I got an update today from the tracker. It seems they are still doing something with these issues - they seem to have united them now youtrack.jetbrains.com/issue/IDEA-92793 Commented May 22, 2014 at 11:18
  • Yeah, I searched and searched, but their search sucks, so I created a new issue, and then it got marked as a dupe of your original. So upvote Alexei's issue
    – Mixologic
    Commented May 22, 2014 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.