patchbomb: make `hg email` reusable for other patch sources
Adds two internal options, patches and patchnames, which allow other extensions
to email a given set of patches. The pbranch extension needs this to send its
patches which are diffs between topic branches.
#!/bin/sh
hg init
touch a
hg add a
hg ci -m "a" -d "1000000 0"
echo 123 > b
hg add b
hg diff --nodates
hg diff --nodates -r tip
echo foo > a
hg diff --nodates
hg diff -r ""
hg diff -r tip -r ""
true