Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A70C11BEF for ; Fri, 2 May 2014 05:23:03 +0000 (UTC) Received: (qmail 61538 invoked by uid 500); 2 May 2014 05:23:02 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 61130 invoked by uid 500); 2 May 2014 05:22:56 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Delivered-To: moderator for users@subversion.apache.org Received: (qmail 92765 invoked by uid 99); 1 May 2014 19:30:58 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ericmberge@gmail.com designates 209.85.216.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=97edmjmv+4yzxFB/0S3HdPuXTi3lFA6uTTul9k/zihY=; b=SXl5Yc+1xCfJAhXfpy0iZ/3+iQLQlbz94QOJqCq1kYx2VSeeHrz5rLVGZCCQfusxcd tmHtfYSsrSlJD0sIM01wKeQrLqtIVnpK9Col/7BbAqc6fRP0XLQHmOHWmDyPpmx4Iv6i ZE8EKBc+ypgDrrs3YDu4vccqbFXwG2xSjBbUUDNRtjm8b3J+mhH2u/Q7zlWvH7tVqX1c D5TsCboLjdMyqkdPJSLeTCetEoD4oGcHkz7u0wMeQu1OweruKBxasAvy8GMF94+5TUZm HPnJ1aEBUQ6LCNi+13LdQ2bfwMmBC7tuJOJNpFtPZnQsg1FXVBcBnd5u5L3+17uhQ8zw mN2Q== MIME-Version: 1.0 X-Received: by 10.224.61.200 with SMTP id u8mr16872420qah.18.1398972633776; Thu, 01 May 2014 12:30:33 -0700 (PDT) Date: Thu, 1 May 2014 14:30:33 -0500 Message-ID: Subject: Git Patch fails to apply with Svn Patch From: Eric Berge To: users@subversion.apache.org Content-Type: multipart/alternative; boundary=089e0149512ce3090404f85bb2f2 X-Virus-Checked: Checked by ClamAV on apache.org --089e0149512ce3090404f85bb2f2 Content-Type: text/plain; charset=UTF-8 I was running "svn patch" with a patch I created with "git diff" and it failed to apply, however it applies just fine with the default "patch" command on my Rhel 6.5 system. This is due to the "extended header" information that git puts before the actual diff in some cases. I validated this by removing the lines beginning with "old mode" and "new mode" in the patch below (file "PATCH2") and then "svn patch" applied the patch successfully. I'd like to request that "svn patch" be able to ignore this extended header information and be able to apply the patch successfully without getting the "skipping missing target" error. I guess there's an argument that some of this extended header info should be processed by "svn patch" but for, for my purposes, it would be enough that it ignored it and applied the rest of the patch. Here's an example (in this case the extended header is describing a chmod change to the target file, indicated by the "old mode" and "new mode" lines): *$ cat PATCH2* *diff --git a/Makefile b/Makefile* *old mode 100644* *new mode 100755* *index caef0a5..310e8e9* *--- a/Makefile* *+++ b/Makefile* *@@ -5,6 +5,7 @@ export BUILD_SYS_ROOT* * export BUILD_TARGET_ROOT* * export BUILD_DIR* * export CMAKE_PASSTHROUGH_ARGS* *+export ADD_FAKE_VARIABLE* * export DESTDIR* * export DISTPKG_LOC* * export WITH_MOVER* *$ svn patch PATCH2* *Skipped missing target: 'b/Makefile'* *Summary of conflicts:* * Skipped paths: 1* *$ patch -p1 < PATCH2* *patching file Makefile* *$ svn diff* *Index: Makefile* *===================================================================* *--- Makefile (revision 42326)* *+++ Makefile (working copy)* *@@ -5,6 +5,7 @@* * export BUILD_TARGET_ROOT* * export BUILD_DIR* * export CMAKE_PASSTHROUGH_ARGS* *+export ADD_FAKE_VARIABLE* * export DESTDIR* * export DISTPKG_LOC* * export WITH_MOVER* Thanks for your consideration of this request, Eric Berge Senior File System Developer, StorNext File System Quantum Corporation eric.berge@quantum.com P.S. Just for your reference, if you're curious about what the full set of "extended header" info git generates, the following is from the git-diff man page from the version (1.8.2.1) running on my system: old mode new mode deleted file mode new file mode copy from copy to rename from rename to similarity index dissimilarity index index .. --089e0149512ce3090404f85bb2f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I was running "svn patch" with a patch I created= with "git diff" and it failed to apply, however it applies just = fine with the default "patch" command on my Rhel 6.5 system.

This is due to the "extended header" information t= hat git puts before the actual diff in some cases. =C2=A0I validated this b= y removing the lines beginning with "old mode" and "new mode= " in the patch below (file "PATCH2") and then "svn patc= h" applied the patch successfully.

I'd like to request that "svn patch" be a= ble to ignore this extended header information and be able to apply the pat= ch successfully without getting the "skipping missing target" err= or. =C2=A0I guess there's an argument that some of this extended header= info should be processed by "svn patch" but for, for my purposes= , it would be enough that it ignored it and applied the rest of the patch.<= /div>

Here's an example (in this case the extended header= is describing a chmod change to the target file, indicated by the "ol= d mode" and "new mode" lines):



$ cat PATCH2
diff --git a/Makefile b/Makefile
old mode 100644
new mode 100755
index caef0a5..310e8e9=
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ export BUIL= D_SYS_ROOT
= =C2=A0export BUILD_TARGET_ROOT
=C2=A0export BUILD_DIR
=C2=A0export CMAKE_= PASSTHROUGH_ARGS
+export ADD_FAKE_VARIABLE
=C2=A0export DESTDIR
=C2=A0export DISTPKG_= LOC
=C2=A0exp= ort WITH_MOVER
$ svn patch PATCH2=
Skipped miss= ing target: 'b/Makefile'
Summary of conflicts:
=C2=A0 Skipped paths: 1
$ patch= -p1 < PATCH2
patching file Makefile
$ svn diff
Index: Makefile<= /font>
=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Makefile (revision 42326)
+++ Makefile (working copy)
@@ -5,6 +5,7 @@
=C2=A0export BUILD_TARGET_= ROOT
=C2=A0ex= port BUILD_DIR
=C2=A0export CMAKE_PASSTHROUG= H_ARGS
+expor= t ADD_FAKE_VARIABLE
=C2=A0export DESTDIR
=C2=A0export DISTPKG_LOC<= /font>
=C2=A0export WITH= _MOVER



<= div>Thanks for your consideration of this request,

Eric Berge
Senior File System Developer, Stor= Next File System
Quantum Corporation



P.S. =C2=A0Just for your reference, if you= 9;re curious about what the full set of "extended header" info gi= t generates, the following is from the git-diff man page from the version (= 1.8.2.1) running on my system:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0old mode <mode>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0new mode <mode>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0deleted file mode <mode>
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0new file mode &l= t;mode>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0copy from <p= ath>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0co= py to <path>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0rename from <path>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0rename to <path>
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0similarity index <number>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dissimilarity i= ndex <number>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0index <hash>..<hash> <mode>

--089e0149512ce3090404f85bb2f2--