So I think a new patch format is in the cards. I am thinking of
making it a single file. At the beginning, there would an index, then
all of the metadata changes (add, delete, rename, copy, is_patched,
properties), followed by all of the xdelta patches (forward and
backward). I think I can steal almost everything that I need from
monotone in terms of diff3, pretty printing diffs, etc. That would
get rid of the diff/diff3/patch dependency altogether.
One nice thing about this is that it becomes fairly straightforward to
translate this single file format into something you might email
around.