Search:

PmWiki

pmwiki.org

edit SideBar

Main / Patch

To create a folder patch file use diff -ruN orig/ new/ > file.patch
# -r == recursive, so do subdirectories
# -u == unified style
# -N == treat absent files as empty

patch -s -p0 < file.patch

  1. -s == silent except errors
  2. -p0 == needed to find the proper folder

To undo reverse a patch use -R like patch -R -p0 < file.patch

To force creation of backups of originals (with .orig extension) use -b like patch -b -p0 < file.patch

To dry run it without making changes use --dry-run like patch --dry-run -p0 < file.patch

Quilt is a patch management tool

https://blackfin.uclinux.org/doku.php?id=an_introduction_to_quilt_tool

quilt refresh is the command that actually makes your new patch file appear in its proper place.
Not sure I understand quilt push because the file already has the change... so what does applying the patch actually do? Don't see any changes. However, quilt pop does work and undoes the file edit. Well, I guess what push does is re-inserts the change after you do a pop. But not sure what the difference is between refresh and push.


Page last modified on August 01, 2024, at 02:21 PM