我们在源代码树中作任何修改前,必须用"quilt add"命令将要修改的文件与一个补丁联系起来。在完成修改后,用"quilt refresh"命令将修改保存到已联系的补丁
quilt基础 - Ditvelo - 博客园 (cnblogs.com)
quilt基本使用
-
test目录下有两个文件file1.c file1.h
-
创建一个新patch
quilt new 0001-test.patch
-
把文件加入到topmost patch
quilt add file1.c
接下来对int.c的修改都会记录到topmost patch中去。
-
编辑文件
使用编辑器修改源文件,也可以调用quilt的默认编译器来修改int.c。quilt edit file1.c
-
更新topmost patch
quilt refresh
使用了这条命令之后,修改才会写入到0001-test.patch中
-
继续新建一个patch
quilt new 0002-test.patch
此时topmost变成了0002-test.patch。
现在使用quilt files
查看,此patch下没有跟踪文件
-
添加两个文件file1.c file1.h
quilt add file1.c file1.h
现在使用quilt files
查看,此patch跟踪了两个文件。编辑它们。
- pop/push
回退到某个patch
$ quilt pop 0001-test.patch
Removing patch 0002-test.patch
Restoring file1.c
Restoring file1.h
Now at patch 0001-test.patch
这个命令之后,0001-test.patch将变为topmost patch。所有的修改退回到这个点上。
$ quilt push 0002-test.patch
Applying patch 0002-test.patch
patching file file1.c
patching file file1.h
Now at patch 0002-test.patch
push命令使用0002-test.patch。
(133条消息) <Linux>使用quilt工具制作补丁(patch)文件_记得仰望星空的博客-CSDN博客_quilt打补丁
(133条消息) quilt命令使用介绍_一探究竟的博客-CSDN博客_quilt使用