[sisyphus] Программа для преобразования patch-файла

Aleksey Birukov aebirukov на gmail.com
Сб Окт 29 21:37:54 MSK 2016


Да, спасибо, обошёлся "patch -R"




2016-10-18 14:56 GMT+03:00 Stas <stas.grumbler на gmail.com>:

>
>
> On 18.10.2016 14:23, Aleksey Birukov wrote:
> > Существует ли программа преобразовывает patch файл в обратный?
> IMHO она не имеет смысла, поскольку pathc умеет как применять, так и
> откатывать дифф. RTFM: man patch
> >        -R  or  --reverse
> >           Assume that this patch was created with the old and new
> > files swapped.  (Yes, I'm afraid that does happen occasionally, human
> > nature being what  it  is.)   patch
> >           attempts to swap each hunk around before applying it.
> > Rejects come out in the swapped format.  The -R option does not work
> > with ed diff scripts because there is
> >           too little information to reconstruct the reverse operation.
> >
> >           If the first hunk of a patch fails, patch reverses the hunk
> > to see if it can be applied that way.  If it can, you are asked if you
> > want to  have  the  -R  option
> >           set.  If it can't, the patch continues to be applied
> > normally.  (Note: this method cannot detect a reversed patch if it is
> > a normal diff and if the first command
> >           is an append (i.e. it should have been a delete) since
> > appends always succeed, due to the fact that a null context matches
> > anywhere.  Luckily, most  patches  add
> >           or change lines rather than delete them, so most reversed
> > normal diffs begin with a delete, which fails, triggering the heuristic.)
>
>
> --
> Станислав Дёгтев
> Служба "Ваш админ"
>  Мои контакты:
>  - jabber: grumbler на grumbler.org
>  - email: stas.grumbler на gmail.com и stas на vashadmin.su
>  - телефоны в Е-бурге +79045430461 и +79222112259
>
> _______________________________________________
> Sisyphus mailing list
> Sisyphus на lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/sisyphus
>



-- 
Ответьте, пожалуйста, что-нибудь если получили это письмо.

--
С уважением,
Бирюков Алексей
----------- следующая часть -----------
Вложение в формате HTML было удалено...
URL: <http://lists.altlinux.org/pipermail/sisyphus/attachments/20161029/aad8506f/attachment-0001.html>


Подробная информация о списке рассылки Sisyphus