hg -q log ... prints changeset number.

Alan Mackenzie acm at muc.de
Mon Apr 9 17:32:56 UTC 2012


Hi, everyone.

On Mon, Apr 09, 2012 at 12:51:59PM -0400, Harvey Chapman wrote:
> On Apr 9, 2012, at 12:41 PM, Masklinn wrote:

> > On 2012-04-09, at 18:35 , Harvey Chapman wrote:

> >> On Apr 9, 2012, at 11:33 AM, Masklinn wrote:

> >>> Surely there's no point to a command which doesn't display anything.
> >>> Considering the normal log, this looks plenty quiet to me.

> >> In defense of Alan:
> >> There are plenty of unix commands that emit no regular output when
> >> told to run quietly but they do return an exit code indicating the
> >> result. Alan justifiably assumed that Mercurial's -q would fit the
> >> familiar pattern and when it didn't, he assumed that one tool,
> >> Mercurial, was broken, and not the established pattern.

> > I'm not sure I would call the pattern "familiar" or "established"
> > since its implementation is pretty arbitrary (as is repetitions of qs
> > to lower the software's verbosity further).

> > And I would not expect *log* to be silent on a match anyway, `id`
> > maybe but definitely not log.

Thanks for drawing my attention to 'identify', which I hadn't known about
before.

> Fair enough. I would have incorrectly assumed that quiet meant no
> output and not "less verbose". I don't have any problem with how it
> works, I simply see the potential for confusion. Although, I'm also not
> advocating for a --less-verbose option. :)

Yes, I incorrectly assumed "suppress output" meant "don't write
anything".  My mistake.  The documentation is not wrong - some output
does get suppressed.  It's no big deal - I can just chuck the output into
/dev/null.

> Perhaps, just rewriting this line from hg help log would suffice:

> from: -q --quiet                   suppress output

> to:   -q --quiet                   suppress most output
>       -q --quiet                   less output
> something like that.

Yes, I think it would.

Thanks for the info.

-- 
Alan Mackenzie (Nuremberg, Germany).



More information about the Mercurial mailing list