diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1041,7 +1041,9 @@ class localrepository(repo.repository): match.bad = bad if working: # we need to scan the working dir - subrepos = ctx1.substate.keys() + subrepos = [] + if '.hgsub' in self.dirstate: + subrepos = ctx1.substate.keys() s = self.dirstate.status(match, subrepos, listignored, listclean, listunknown) cmp, modified, added, removed, deleted, unknown, ignored, clean = s