这是什么补丁格式,我该如何应用它

What patch format is this and how do I apply it

这是什么补丁格式,我该如何应用它?

https://code.djangoproject.com/attachment/ticket/9025/nested_inlines_2.diff

From 117e99511e0985701780ed1bcd3afd456e244ae3
     Added assertXML[Not]Equal assertions

To   015b1c15f25f2f72a40a9bfce9d91ec91ddff2a2
     Tests + revert firebug

----------------------- django/contrib/admin/options.py -----------------------
index f4205f2..58c55b0 100644
@@ -715,11 +715,16 @@ class ModelAdmin(BaseModelAdmin):
         """
         obj.delete()

-    def save_formset(self, request, form, formset, change):
+    def save_formset(self, request, formset, change):

我无法使用 patch 来应用它,因为出现以下错误:

patch: **** Only garbage was found in the patch input.

diff 生成的正常补丁应该如下所示:

--- /home/user/work/django-nested-inlines-master-1/nested_inlines/admin.py  2014-09-30 14:42:23.000000000 +0100
+++ /home/user/work/django-nested-inlines-master-2/nested_inlines/admin.py  2014-03-07 20:11:35.000000000 +0000
@@ -1,4 +1,3 @@
-from django import VERSION as DJANGO_VERSION
 from django.contrib.admin.options import (ModelAdmin, InlineModelAdmin,
     csrf_protect_m, models, transaction, all_valid,
     PermissionDenied, unquote, escape, Http404, reverse)
@@ -74,7 +73,6 @@

this Trac comment, this diff isn't applicable as-is, but needs some editing to become a valid patch. The file's creator later commented判断他也不知道自己哪里做错了

117e99511e0985701780ed1bcd3afd456e244ae3(来自 diff 的第一行)is a valid commit ID 在 django git 仓库中。可能,这就是此更改所基于的修订。你不会在 repo 中找到 015b1c15f25f2f72a40a9bfce9d91ec91ddff2a2,因为 diff 创建者没有推送他的本地提交而是提交了 diff 文件。

如果你想要这些更改,你最好的机会可能是在将它们应用于 django git 存储库的地方寻找提交(请参阅第一个链接的 Trac 评论)或询问参与 Trac ticket.