JFilesystemPatcher with git patches

17 views
Skip to first unread message

Allon Moritz

unread,
Sep 27, 2013, 6:56:51 AM9/27/13
to joomla-de...@googlegroups.com
Hello
Did somebody succeed using the JFilesystemPatcher with Git diff files. I'm using the patcher like

$patcher = JFilesystemPatcher::getInstance();
$patcher->addFile(JPATH_COMPONENT_ADMINISTRATOR.'/test.patch', JPATH_ADMINISTRATOR.'/components/com_dpattachments',2);
echo $patcher->apply();

the patch file looks like 

### Eclipse Workspace Patch 1.0
#P DPAttachments
diff --git com_dpattachments/admin/controller.php com_dpattachments/admin/controller.php
index c5d5c38..894f4d0 100644
--- com_dpattachments/admin/controller.php
+++ com_dpattachments/admin/controller.php
@@ -7,6 +7,8 @@
  */
 defined('_JEXEC') or die();
 
+// add a test comment
+
 class DPAttachmentsController extends JControllerLegacy {
 
  protected $default_view = 'attachments';

But it fails on the header detection in the findHeader function. Any help would be appreciated!!
Reply all
Reply to author
Forward
0 new messages