Since this bug was logged, my thinking around how this should be handled has changed a bit. Dirty 'file state' headers, even those directly adjacent to a patch, are not valid entities in a unified diff and should not really be directly associated with a patch object. With our launchpad usecase however, we really need to not only allow parsing of these headers (allowed by allow_dirty), but also to preserve them.
Since this bug was logged, my thinking around how this should be handled has changed a bit. Dirty 'file state' headers, even those directly adjacent to a patch, are not valid entities in a unified diff and should not really be directly associated with a patch object. With our launchpad usecase however, we really need to not only allow parsing of these headers (allowed by allow_dirty), but also to preserve them.