Travis Vitek wrote:
Hello all,
I'm attempting to make a final patch to for STDCXX-552, and I'm running
into an issue that I hope someone here knows the answer to. The problem
is that I cannot apply a patch created with svn diff. I've recreated the
series of commands below.
I was able to reproduce this with several different implementations
of patch (HP-UX, Linux, and Solaris) but I'm not sure I understand
what's causing it. A patch to add either line 1 alone or line 5
alone applies (with fuzz of 2, whatever that means), but a patch
to add both lines fails.
Martin
I believe that the problem is that svn diff strips the contents of $Id$
but doesn't report it as a changed line. The result is that the patch
utility cannot use the resulting diff to locate the actual lines to
update [even if the line numbers are in the diff, patch uses them as a
hint to find where to apply the patch]. Interestingly enough, I don't
have any problem using TortiseSVN to apply the patchfile on windows.
Travis
[EMAIL PROTECTED] 915 % head mapfile.gcc
########################################################################
###
#
# $Id: mapfile.gcc 354455 2005-12-06 15:49:44Z sebor $
#
########################################################################
###
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
[EMAIL PROTECTED] 916 % svn diff mapfile.gcc
Index: mapfile.gcc
===================================================================
--- mapfile.gcc (revision 577797)
+++ mapfile.gcc (working copy)
@@ -1,6 +1,28 @@
+#######################################################################
####
#
# $Id$
#
+#######################################################################
####
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# Copyright 1994-2007 Rogue Wave Software.
+#
+#######################################################################
####
RWSTD.4.1.3
{
[EMAIL PROTECTED] 917 % svn diff mapfile.gcc > patchfile
[EMAIL PROTECTED] 918 % svn revert mapfile.gcc
Reverted 'mapfile.gcc'
[EMAIL PROTECTED] 919 % patch mapfile.gcc patchfile
patching file mapfile.gcc
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file mapfile.gcc.rej
[EMAIL PROTECTED] 920 %