diff -r 8c9e84b44221 -r 50981ce36236 mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Thu Apr 17 09:36:08 2014 +0900 +++ b/mercurial/hgweb/webutil.py Thu Apr 17 09:36:08 2014 +0900 @@ -7,7 +7,7 @@ # GNU General Public License version 2 or any later version. import os, copy -from mercurial import match, patch, error, ui, util, pathutil +from mercurial import match, patch, error, ui, util, pathutil, context from mercurial.i18n import _ from mercurial.node import hex, nullid from common import ErrorResponse @@ -138,6 +138,9 @@ yield d def parents(ctx, hide=None): + if (isinstance(ctx, context.basefilectx) and + ctx.changectx().rev() != ctx.linkrev()): + return _siblings([ctx._repo[ctx.linkrev()]], hide) return _siblings(ctx.parents(), hide) def children(ctx, hide=None):