How to make patch.diff() aware of encode/decode filters?

Steve Borho steve at borho.org
Tue Mar 10 21:06:24 CDT 2009


I've verified that the win32text extension, when it's encoding filters
are enabled, does not play very well with other extensions that try to
use patch.diff().

These include record, shelve, and MQ (and probably attic).  All these
extensions use patch.diff() to get diffs for the current working
directory and then try to apply those diffs back to the working copy
later in different circumstances.

patch.diff() seems to compare the decoded wc contents against the native
repository contents (which is probably the only sane default).  When the
win32text filters are in use, the patches created in this way will not
apply to the working copy.

What is the best solution for this?  Should patch.diff() have an option
to encode the repository data before comparing it against the working
copy?  Should all these extensions decode the working copy files before
trying to apply patches?  Should patch.applydiff() be made aware of the
encode/decode filters?

--
Steve Borho



More information about the Mercurial-devel mailing list