bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-patch] Patch fails to find files under subdirectory


From: Octavio Alvarez
Subject: [bug-patch] Patch fails to find files under subdirectory
Date: Sun, 20 Dec 2009 14:48:27 -0800
User-agent: Opera Mail/10.10 (Linux)

Hi!

If I diff a file under the current directory, patch applies.

If I diff a file under a subdirectory, patch fails.

I attach a command log.

Patch version is 2.6, Debian package 2.6-2.

Octavio.


[Sun Dec 20 14:37:42 -0800 -- address@hidden:~/patch-test]
$ ls -l
total 24
-rw-r--r-- 1 alvarezp alvarezp 7127 Dec 20 14:37 slpcall.bak
-rw-r--r-- 1 alvarezp alvarezp 7127 Dec 20 14:37 slpcall.c
-rw-r--r-- 1 alvarezp alvarezp 7232 Dec 20 14:37 slpcall.c.2

[Sun Dec 20 14:37:43 -0800 -- address@hidden:~/patch-test]
$ diff -u slpcall.c slpcall.c.2 > p

[Sun Dec 20 14:37:57 -0800 -- address@hidden:~/patch-test]
$ cat p
--- slpcall.c   2009-12-20 14:37:36.000000000 -0800
+++ slpcall.c.2 2009-12-20 14:37:36.000000000 -0800
@@ -66,6 +66,11 @@

        slpcall->slplink = slplink;

+       slpcall->wait_for_socket = FALSE;
+       slpcall->xfer = NULL;
+       slpcall->dc = NULL;
+       slpcall->branch = NULL;
+
        msn_slplink_add_slpcall(slplink, slpcall);

slpcall->timer = purple_timeout_add_seconds(MSN_SLPCALL_TIMEOUT, msn_slpcall_timeout, slpcall);

[Sun Dec 20 14:38:00 -0800 -- address@hidden:~/patch-test]
$ diff -u slpcall.bak slpcall.c # .bak is a backup of original

[Sun Dec 20 14:38:19 -0800 -- address@hidden:~/patch-test]
$ patch < p
patching file slpcall.c

[Sun Dec 20 14:38:33 -0800 -- address@hidden:~/patch-test]
$ # So far, so good. Let's try again under ./x/

[Sun Dec 20 14:38:53 -0800 -- address@hidden:~/patch-test]
$ cp slpcall.bak slpcall.c

[Sun Dec 20 14:39:02 -0800 -- address@hidden:~/patch-test]
$ mkdir x

[Sun Dec 20 14:39:04 -0800 -- address@hidden:~/patch-test]
$ mv slpcall* x

[Sun Dec 20 14:39:06 -0800 -- address@hidden:~/patch-test]
$ ls -l
total 8
-rw-r--r-- 1 alvarezp alvarezp  410 Dec 20 14:37 p
drwxr-xr-x 2 alvarezp alvarezp 4096 Dec 20 14:39 x

[Sun Dec 20 14:39:08 -0800 -- address@hidden:~/patch-test]
$ diff -u x/slpcall.c x/slpcall.c.2 > px

[Sun Dec 20 14:39:20 -0800 -- address@hidden:~/patch-test]
$ cat px
--- x/slpcall.c 2009-12-20 14:39:02.000000000 -0800
+++ x/slpcall.c.2       2009-12-20 14:37:36.000000000 -0800
@@ -66,6 +66,11 @@

        slpcall->slplink = slplink;

+       slpcall->wait_for_socket = FALSE;
+       slpcall->xfer = NULL;
+       slpcall->dc = NULL;
+       slpcall->branch = NULL;
+
        msn_slplink_add_slpcall(slplink, slpcall);

slpcall->timer = purple_timeout_add_seconds(MSN_SLPCALL_TIMEOUT, msn_slpcall_timeout, slpcall);

[Sun Dec 20 14:39:22 -0800 -- address@hidden:~/patch-test]
$ patch < px
patching file slpcall.c.2
Hunk #1 FAILED at 66.
1 out of 1 hunk FAILED -- saving rejects to file slpcall.c.2.rej


[Sun Dec 20 14:39:27 -0800 -- address@hidden:~/patch-test]
$ patch --version
patch 2.6
Copyright (C) 1988 Larry Wall
Copyright (C) 2003 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall and Paul Eggert






reply via email to

[Prev in Thread] Current Thread [Next in Thread]