# HG changeset patch # User Pierre-Yves David # Date 1711560106 0 # Node ID f28d5d68b71af2f013d8b7f4d980d69217aaa458 # Parent 49faa72b994e494d8f071dfa7efdd6a564d755bc postincoming: avoid computing branchhead if no report will be posted This otherwise defeat some of the branch v3 optimization. diff -r 49faa72b994e -r f28d5d68b71a mercurial/commands.py --- a/mercurial/commands.py Tue Mar 26 13:46:44 2024 +0000 +++ b/mercurial/commands.py Wed Mar 27 17:21:46 2024 +0000 @@ -5396,7 +5396,9 @@ msg = _(b"not updating: %s") % stringutil.forcebytestr(inst) hint = inst.hint raise error.UpdateAbort(msg, hint=hint) - if modheads is not None and modheads > 1: + if ui.quiet: + pass # we won't report anything so the other clause are useless. + elif modheads is not None and modheads > 1: currentbranchheads = len(repo.branchheads()) if currentbranchheads == modheads: ui.status(