def nochangesfound(ui, repo, excluded=None):
    """Report no changes for push/pull, excluded is None or a list of
    nodes excluded from the push/pull.
    """
    secretlist = []
    if excluded:
        for n in excluded:
            ctx = repo[n]
            if ctx.phase() >= phases.secret:
                secretlist.append(n)

    if secretlist:
        ui.status(
            _("no changes found (ignored %d secret changesets)\n") % len(secretlist)
        )
    else:
        ui.status(_("no changes found\n"))