patch: support diff data loss detection and upgrade
In worst case, generating diff in upgrade mode can be two times more expensive
than generating it in git mode directly: we may have to regenerate the whole
diff again whenever a git feature is detected. Also, the first diff attempt is
completely buffered instead of being streamed. That said, even without having
profiled it yet, I am convinced we can fast-path the upgrade mode if necessary
were it to be used in regular diff commands, and not only in mq where avoiding
data loss is worth the price.
% extracting documentation from C
checking for parse errors with rst2html
% extracting documentation from da
checking for parse errors with rst2html
% extracting documentation from de
checking for parse errors with rst2html
% extracting documentation from el
checking for parse errors with rst2html
% extracting documentation from fr
checking for parse errors with rst2html
% extracting documentation from it
checking for parse errors with rst2html
% extracting documentation from ja
checking for parse errors with rst2html
% extracting documentation from pt_BR
checking for parse errors with rst2html
% extracting documentation from sv
checking for parse errors with rst2html
% extracting documentation from zh_CN
checking for parse errors with rst2html
% extracting documentation from zh_TW
checking for parse errors with rst2html