refactor text diff/patch code.
rename commands.dodiff to patch.diff.
rename commands.doexport to patch.export.
move some functions from commands to new mercurial.cmdutil module.
turn list of diff options into mdiff.diffopts class.
patch.diff and patch.export now has clean api for call from 3rd party
python code.
grep: display correct user/revision for --all in reverse.
Also handle multiple occurrences of the same line by storing
linestates in an array instead of a dict, and using difflib
to compute the difference between linestates.
Teach import to understand git diff extensions.
Vanilla patch chokes on git patches that include files that are copied
or renamed, then modified. So this code detects that case and rewrites
the patch if necessary.
import: get lock and wlock one time
this makes import of many patches 6x faster in kernel repo.
Adjusted documentation for hgrc's "[smtp] host" for change in
9f745d3675d4.