[PATCH 1 of 2 v2] remove: queue warnings until after status messages (issue5140) (API)
pierre-yves.david at ens-lyon.org
Sat Mar 19 14:04:34 EDT 2016
On 03/18/2016 07:47 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1458238776 0
> # Thu Mar 17 18:19:36 2016 +0000
> # Node ID 5c624c08cd0ecdb725a407f4ad87c538a955fb56
> # Parent dfd5a6830ea7cd56909b6667c78ae122cc3a5aa1
> remove: queue warnings until after status messages (issue5140) (API)
> Before this change, warnings were interspersed with (and easily drowned out by)
> status messages.
> abstractsubrepo.removefiles has an extra argument warnings,
> into which callees should append their warnings.
> Note: Callees should not assume that there will be items in the list,
> today, I'm lazily including any other subrepos warnings, but
> that may change.
> cmdutil.remove has an extra optional argument warnings,
> into which it will place warnings.
> If warnings is omitted, warnings will be reported via ui.warn()
> as before this change (albeit, after any status messages).
I'm half worried that massive issue with a `hg rm` won't be reported
early, but I overall agree that the current form is bad (as it drown
warning out of user attention).
Maybe we could use a final warning something like:
"failed to remove 42 files"
More information about the Mercurial-devel