玩转quilt
Create the patch freely
quilt settings
It is a reference for quilt settings:
1 | # Example /etc/quilt.quiltrc |
quilt operations for daily work
删除与patch相关的文件.
删除前状态
1
2
3$ quilt files
related_file_a.c
related_file_b.c删除(quilt remove)
1
2$ quilt remove related_file_b.c
File related_file_b.c removed from patch patches/top.patch删除后状态
1
2$ quilt files
related_file_a.c若要删除指定patch的某个相关文件
1
$ quilt remove -P <patch_name> <related_file_name>
查看&编辑patch header信息
默认查看top patch的header
1
$ quilt header
也可以指定patch
1
$ quilt header patches/XX/YY/ZZ.patch
编辑patch header
1
$ quilt header -e
同理也可以指定patch
1
$ quilt header -e patches/XX/YY/ZZ.patch
查看patch与相关文件的关系
查看patch与哪些文件相关
1
2
3$ quilt files
or
$ quilt files <patch_name>查看文件与哪些patch相关
1
$ quilt patches <file_name>
combine patches
combine的patches(a.patch, b.patch, c.patch)在serial文件中要是连续的.如果不是,要reposition
1
2
3
4
5
6in serial file
XX/1.patch
XX/a.patch <--- from
XX/b.patch
XX/c.patch <--- to
XX/d.patch需要combine的patches要已经quilt pu, 即quilt to在c.patch(如果在c.patch之后比较远的patch,会有warning提示,最近有patch改动过,相关文件)
combine
1
$ quilt diff --combine XX/a.patch -P XX/c.patch > patches/XX/a_b_c.patch
unapply patches
1
$ quilt po XX/1.patch
replace a.patch, b.patch, c.patch with combined patch in serial file
1
2
3
4
5
6XX/1.patch
#XX/a.patch
#XX/b.patch
#XX/c.patch
XX/a_b_c.patch
XX/d.patchapply combined patch
1
$ quilt pu -a
git status (no source code change)
Import a patch
1
2$ quilt import ../a.patch -P fix/a.patch
Importing patch ../a.patch (stored as patches/fix/a.patch)