Configuring hg for svn-style diffs.

Tom Anderson tom.anderson at e2x.co.uk
Mon Jul 18 10:06:57 UTC 2011


On 16 July 2011 00:31, Daniel Carrera <dcarrera at gmail.com> wrote:

> With the hgsubversion extension you can run "hg diff --svn" to get svn-style
> diffs. Now, I would very much prefer to have a config option in ~/.hgrc
> along the lines of:
>
> [diff]
> svn = 1
>
> So that you could run "hg diff" and always get the svn-style diffs. Is there
> a way to do this?

There's this:

[alias]
diff = diff --svn

But that will only affect diffs caused with an explicit 'hg diff'.
Diffs generated by other commands (eg 'hg outgoing -p') won't be
affected.

If you do do this, then you might be better off with something like:

[alias]
sdiff = diff --svn

That is, defining a new command, rather than redefining the existing one.

tom

-- 
Tom Anderson         |                e2x Ltd, 1 Norton Folgate, London E1 6DB
(e) tom at e2x.co.uk    |    (m) +44 (7960) 989794    |    (f) +44 (20) 7100 3749



More information about the Mercurial mailing list