diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1456,9 +1456,9 @@ for instability, revset in instabilitytypes: delta = (newinstabilitycounts[instability] - oldinstabilitycounts[instability]) - if delta > 0: - repo.ui.warn(_('%i new %s changesets\n') % - (delta, instability)) + msg = getinstabilitymessage(delta, instability) + if msg: + repo.ui.warn(msg) if txmatch(_reportnewcssource): @reportsummary @@ -1500,6 +1500,10 @@ repo.ui.status(_('%d local changesets published\n') % len(published)) +def getinstabilitymessage(delta, instability): + if delta > 0: + return _('%i new %s changesets\n') % (delta, instability) + def nodesummaries(repo, nodes, maxnumnodes=4): if len(nodes) <= maxnumnodes or repo.ui.verbose: return ' '.join(short(h) for h in nodes)