add --output to hg diff

Evan Powers evan.powers+hg at
Mon Mar 3 10:39:42 CST 2008

On Mon, Feb 18, 2008 at 9:05 AM, TK Soh <teekaysoh at> wrote:
> I wonder if it'd make sense to have a --output for hg diff too. This
>  should allow user to bypass the OS messing with the line terminations.
>  On a personal agenda, I'd like to be able to save the diff output
>  directly to a file from within TortoiseHg dialogs.

I've wanted that exact feature several times.

I sometimes want to save some piece of my work prior to a revert. I
could use MQ, but that's pretty heavy handed. On Linux I'd just "hg
diff >changes.patch", but of course if I do that on Windows it garbles
the line endings and I end up with a patch that won't apply. A command
line option to write straight into a file, however....

- Evan

More information about the Mercurial mailing list