- 论坛徽章:
- 0
|
本帖最后由 dulao5 于 2011-02-19 00:10 编辑
大家好, 我试着鼓捣Ion , 有个Ion的patch文件, 怎么打都打不上.
仔细试了一下, 这个patch文件内的diff命令参数是diff -rN , 不是diff -rNu
- [dzg@dev ~]$ cd tmp/
- [dzg@dev tmp]$ mkdir -p aaa aaafix
- [dzg@dev tmp]$ echo -ne "test\ntest2\n" > aaafix/test.txt
- [dzg@dev tmp]$ echo -ne "test\n" > aaa/test.txt
- [dzg@dev tmp]$ diff -rN aaa aaafix
- diff -rN aaa/test.txt aaafix/test.txt
- 1a2
- > test2
- [dzg@dev tmp]$ diff -rN aaa aaafix > test.diff
- [dzg@dev tmp]$ patch -p0 -i test.diff
- patch: **** Only garbage was found in the patch input.
- [dzg@dev tmp]$ patch -p1 -i test.diff
- patch: **** Only garbage was found in the patch input.
- [dzg@dev tmp]$ cd aaa
- [dzg@dev tmp]$ patch -p1 -i ../test.diff
- patch: **** Only garbage was found in the patch input.
复制代码 请问怎么办呢?
或者我想问: 一个diff -rN 生成的patch文件 , 能不能方便的转成 diff -Nur 那样格式的patch文件? |
|