> From: "Parmenides" <mobile.parmeni...@gmail.com>
> To: <lfs-support@linuxfromscratch.org>
> Date: Tue, 7 Jan 2014 01:10:55 +0800
> Subject: [lfs-support] Patch delete a directory
>
>
>
> Hi,
>
>     I am not sure whether I should ask this quesiton here. I am trying 
> 'diff' and 'patch', and have encounter a problem.
>
>     I have create two directories as follows:
>
> old
> |-- musician
> |   `-- name
> `-- writer
>
> new
> |-- musician
> |   `-- name
> `-- writer
>     `-- name
>


Is writer/name an empty file, or what? Can you post:
$ tree -apugsDF old new 


> Then,  'diff' is used to compare the two directories and generated a diff.
>
>                             diff -Nru old new > patch.diff
>


Can you post what patch.diff contains?


Any particular reason why you don't include '-a' flag? (e.g.
'LC_ALL=C TZ=UTC0 diff -Naur old new' per recommended format in patch 
man-page. )


> Then, 'patch' is used to make 'old' identical to 'new'.
>
>                             patch -p1 --dir old < patch.diff
>
> In the following, I want to 'old' revert to its origin:
>
>                             patch -p1 -R --dir old < patch.diff
>
> The structruct of 'old' has turn to the following:
>
>
> old
> `-- musician
>     `-- name
>
> It obvious that a subdirectory 'writer' has disappeared. I wonder some way 
> to keep 'writer' from being deleted. Thx.


--
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to