diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -869,7 +869,7 @@ def _outgoing(ui, repo, dest, opts): revs = [repo.lookup(rev) for rev in scmutil.revrange(repo, revs)] other = peer(repo, opts, dest) - outgoing = discovery.findcommonoutgoing(repo.unfiltered(), other, revs, + outgoing = discovery.findcommonoutgoing(repo, other, revs, force=opts.get('force')) o = outgoing.missing if not o: diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -120,10 +120,6 @@ def nochangesfound(ui, repo, excluded=No secretlist = [] if excluded: for n in excluded: - if n not in repo: - # discovery should not have included the filtered revision, - # we have to explicitly exclude it until discovery is cleanup. - continue ctx = repo[n] if ctx.phase() >= phases.secret and not ctx.extinct(): secretlist.append(n)