bug-gnu-utils
[Top][All Lists]
Advanced

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

comment on patch-2.5.4


From: Support Team
Subject: comment on patch-2.5.4
Date: Fri, 6 Feb 2009 10:19:07 -0800

Consider a patch file that patches the same file more than once
in the sense that it contains more than one  output from "diff".
(For example the Red Hat 9 kernel patch patches "kernel/signal.c" 
three times with three different runs from diff.)

If numbered backups are made, applying such a patch causes one
numbered backup for each diff, so it is possible to see what has changed
at each stage.  However there is no versioning on the ".rej" file, so if
there are rejects at more than one stage, only the latest set is kept.

Yes, therre are workarounds, but also allowing numbering of the reject
files would be nice in this case.

simple example:

tyan1[2230]$ cat aaa
aaa
bbb
ccc
ddd
eee
fff
ggg
hhh
iii
jjj
kkk
lll
tyan1[2231]$ cat xxx
--- aaa 2009-02-06 10:12:33.000000000 -0800
+++ bbb 2009-02-06 10:12:03.000000000 -0800
@@ -1,7 +1,7 @@
 aaa
 bbb
 ccc-no-match-here
-ddd
+DDD
 eee
 fff
 ggg
--- aaa 2009-02-06 10:12:03.000000000 -0800
+++ bbb 2009-02-06 10:12:27.000000000 -0800
@@ -5,7 +5,7 @@
 eee
 fff
 ggg-no-match-here
-hhh
+HHH
 iii
 jjj
 kkk
tyan1[2232]$ patch -b -V numbered < xxx
patching file aaa
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file aaa.rej
patching file aaa
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file aaa.rej
tyan1[2233]$ ls aaa.~*
aaa.~1~  aaa.~2~
tyan1[2234]$ ls aaa.r*
aaa.rej
tyan1[2235]$ cat aaa.rej
***************
*** 5,11 ****
  eee
  fff
  ggg-no-match-here
- hhh
  iii
  jjj
  kkk
--- 5,11 ----
  eee
  fff
  ggg-no-match-here
+ HHH
  iii
  jjj
  kkk
tyan1[2236]$





reply via email to

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