diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2621,6 +2621,11 @@ if bookmark and changesets: raise error.Abort(_(b"-r and -B are mutually exclusive")) + if not bookmark and not changesets: + # Avoid loading obsmarkers if we're accessing only the working copy + # parent (which will never be hidden). + repo = repo.unfiltered() + if bookmark: if bookmark not in repo._bookmarks: raise error.Abort(_(b"bookmark '%s' not found") % bookmark)