# HG changeset patch # User wujek srujek # Date 2012-07-30 22:59:38 # Node ID 06217d3cf8d9f92b8ed52a2cf19fb166701db8fc # Parent 5c64ce6168da0b90a20fcbb97c36f93bb8840bad hgweb: fixes invalid parents / children in comparison Previously, the parents / children were computed relative to the cset of the currently shown file, which was wrong and inconsistent with diff and others. With this patch, the listed csets are those that contain changes to the currently compared file, which don't necessarily have to be the direct parents and children of the changeset itself. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -639,8 +639,8 @@ def comparison(web, req, tmpl): author=ctx.user(), rename=rename, branch=webutil.nodebranchnodefault(ctx), - parent=webutil.parents(ctx), - child=webutil.children(ctx), + parent=webutil.parents(fctx), + child=webutil.children(fctx), leftrev=leftrev, leftnode=hex(leftnode), rightrev=rightrev, diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t --- a/tests/test-hgweb-diffs.t +++ b/tests/test-hgweb-diffs.t @@ -628,7 +628,7 @@ comparison new file children - 559edbd9ed20 + @@ -746,7 +746,7 @@ comparison existing file parents - 559edbd9ed20 + 0cd96de13884 children @@ -870,7 +870,7 @@ comparison removed file parents - d73db4d812ff + 0cd96de13884 children