commands: mention diff -c

Benoit Boissinot benoit.boissinot at ens-lyon.org
Sun Feb 21 06:58:45 CST 2010


On Sun, Feb 21, 2010 at 01:52:14PM +0100, Christian Ebert wrote:
> * timeless on Sunday, February 21, 2010 at 01:22:30 +0200
> > This patch is more for discussion than committing.
> > 
> > Most options take no arguments, -c is like -r, and it's in fact
> > mutually exclusive with it, but entirely undocumented.
> > 
> > # HG changeset patch
> > # User timeless <timeless at mozdev.org>
> > # Date 1266708077 -7200
> > # Node ID 01e33e2fd61eb1f1a0da8ac54278ba80f3638251
> > # Parent  261cc6b0f15c7e83dcff7dd7d5f3607c098c29bd
> > commands: mention diff -c
> > 
> > diff --git a/mercurial/commands.py b/mercurial/commands.py
> > --- a/mercurial/commands.py
> > +++ b/mercurial/commands.py
> > @@ -1114,6 +1114,9 @@ def diff(ui, repo, *pats, **opts):
> >     revisions are specified, the working directory files are compared
> >     to its parent.
> > 
> > +    Alternatively you can specify -c with a revision to use as a
> > +    baseline.
> > +
> 
> A wording that implicitly informs about the difference between
> "hg diff -c <rev>" and "hg log -p -r <rev>" would be nice ;-)
> 
> Well, at least for me as I don't quite grasp the concept. Is the
> only difference that "hg diff -c" omits the patch header?

Yes, that. And you can pass many options to diff to tweak the output,
that you can't easily pass to log.

regards,

Benoit

-- 
:wq


More information about the Mercurial-devel mailing list