A more general interface to diff and patch