# HG changeset patch # User Pierre-Yves David # Date 1349709308 -7200 # Node ID aba3c161bcc606b59ca82c4cae7172b567784698 # Parent 747a2f43d5d99b9f96bfb140b7d604e7fe754228 clfilter: prevent unwanted warning about filtered parents as unknown During changectx __init__ the dirstate's parents MAY be checked. If the repo is filtered, this check will complain "working directory has unknown parents" even if the parents are perfectly known. This may happen when the repo is used for serving and the dirstate has parents that are secret, as those secret changesets will be filtered. diff -r 747a2f43d5d9 -r aba3c161bcc6 mercurial/context.py --- a/mercurial/context.py Mon Oct 08 17:12:09 2012 +0200 +++ b/mercurial/context.py Mon Oct 08 17:15:08 2012 +0200 @@ -95,7 +95,10 @@ # lookup failed # check if it might have come from damaged dirstate - if changeid in repo.dirstate.parents(): + # + # XXX we could avoid the unfiltered if we had a recognizable exception + # for filtered changeset access + if changeid in repo.unfiltered().dirstate.parents(): raise error.Abort(_("working directory has unknown parent '%s'!") % short(changeid)) try: