diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -939,7 +939,7 @@ def clearobscaches(repo): def _mutablerevs(repo): """the set of mutable revision in the repository""" - return repo._phasecache.getrevset(repo, phases.mutablephases) + return repo._phasecache.getrevset(repo, phases.relevant_mutable_phases) @cachefor(b'obsolete') diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -165,6 +165,7 @@ phasenumber2.update({phase: phase for ph phasenumber2.update({b'%i' % phase: phase for phase in phasenames}) # record phase property mutablephases = (draft, secret, archived, internal) +relevant_mutable_phases = (draft, secret) # could be obsolete or unstable remotehiddenphases = (secret, archived, internal) localhiddenphases = (internal, archived) diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -1001,18 +1001,20 @@ Commit is hidden as expected summary: A The hidden commit is an orphan but doesn't show up without --hidden +And internal changesets are not considered for unstability. $ hg debugobsolete `hg id --debug -ir 0` 1 new obsolescence markers obsoleted 1 changesets - $ hg --hidden log -G -r 'unstable()' - * changeset: 1:c01c42dffc7f + $ hg --hidden log -G -r '(0::) - 0' + o changeset: 1:c01c42dffc7f | tag: tip ~ user: test date: Thu Jan 01 00:00:00 1970 +0000 - instability: orphan summary: my test internal commit + $ hg --hidden log -G -r 'unstable()' + $ hg log -G -r 'unstable()'