Comment 5 for bug 538219

Revision history for this message
Abel Deuring (adeuring) wrote :

Emmet, you are absolutely right with your diagnosis. Checking the file content somehow would indeed be a better option. Several people tried already file(1) -- problem is that its implementation currently used in Ubuntu lets you suspect that it is on drugs when you run it on "bzr diff" output. For example,

   bzr diff -r 10511..10512 | file -

for lp:~launchpad-pqm/launchpad/devel/ return "/dev/stdin: ASCII English text"...

Trying "patch" or "bzr patch" is an interesting option, but will break for projects that don't use Launchpad for code hosting. Also, it might be difficult to distinguish cases where the file in question indeed contains diff data but where the patch can't be cleanly applied and the case where the file contains some completely different data.

For now, I' think we should simply add the file name suffix ".debdiff" to the extensions Launchpad considers to be patch data.