Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux > #80262
| Path | csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
| Newsgroups | alt.os.linux |
| Subject | patch a file with the patch command |
| Date | Mon, 5 Aug 2024 09:35:02 +0200 |
| Organization | A noiseless patient Spider |
| Lines | 74 |
| Message-ID | <v8pvb6$iff4$1@dont-email.me> (permalink) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 05 Aug 2024 09:35:02 +0200 (CEST) |
| Injection-Info | dont-email.me; posting-host="6856a21c54385e2a1faca783570869ec"; logging-data="605668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19E97RtE2EBBYneHi42m9aX" |
| User-Agent | Mozilla Thunderbird |
| Cancel-Lock | sha1:1UMITxWrvy2Mb+++EKqvBlettHs= |
| Content-Language | it-IT |
| Xref | csiph.com alt.os.linux:80262 |
Show key headers only | View raw
Hello everyone. I'll show you my file structure right away ├── middle │ ├── orig │ └── revised └── orig I access the middle directory (the working dir) $ cd middle Let's examine the contents of the files $ cat orig ORIG $ cat ../orig ORIG $ cat revised REVISED Note that the contents of the orig and ../orig files are identical (the two files are identical), but that shouldn't be a big deal. Let's create the patches $ diff -u orig revised > patch-middle $ diff -u ../orig revised > patch-up Let's check the created files (the patches) $ cat patch-middle --- orig 2024-08-02 14:22:59.933683396 +0200 +++ revised 2024-08-02 10:17:25.108469758 +0200 @@ -1 +1 @@ -ORIG +REVISED $ cat patch-up --- ../orig 2024-08-02 14:22:59.937683379 +0200 +++ revised 2024-08-02 10:17:25.108469758 +0200 @@ -1 +1 @@ -ORIG +REVISED It looks ok. Note that for both files (orig and ../orig) the same revision file (revised) was used, but, again, this should not be a big deal. Applying the patches $ patch < patch-middle patching file orig $ patch < patch-up patching file orig Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] y Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file orig.rej As you can see with the patch-middle file everything works. While with the patch-up file there is something wrong (Hunk #1 FAILED at 1). Why? Maybe because the ../orig file is in an external directory (a higher level directory "..") than the patch-up file? So? I honestly can't find a plausible explanation.
Back to alt.os.linux | Previous | Next — Next in thread | Find similar | Unroll thread
patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-05 09:35 +0200
Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-05 12:43 +0200
Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-05 17:33 +0200
Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-05 23:05 +0200
Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-06 07:39 +0200
Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-06 08:06 +0200
Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-06 07:36 +0200
csiph-web