changeset 17303:06217d3cf8d9 stable

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.
author wujek srujek <wujek.srujek@googlemail.com>
date Tue, 31 Jul 2012 00:59:38 +0200
parents 5c64ce6168da
children 0368fc55d572
files mercurial/hgweb/webcommands.py tests/test-hgweb-diffs.t
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Tue Jul 31 14:14:15 2012 +0200
+++ b/mercurial/hgweb/webcommands.py	Tue Jul 31 00:59:38 2012 +0200
@@ -639,8 +639,8 @@
                 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,
--- a/tests/test-hgweb-diffs.t	Tue Jul 31 14:14:15 2012 +0200
+++ b/tests/test-hgweb-diffs.t	Tue Jul 31 00:59:38 2012 +0200
@@ -628,7 +628,7 @@
   </tr>
   <tr>
    <th>children</th>
-   <td><a href="/file/559edbd9ed20/a">559edbd9ed20</a> </td>
+   <td></td>
   </tr>
   
   </table>
@@ -746,7 +746,7 @@
   </tr>
   <tr>
    <th>parents</th>
-   <td><a href="/file/559edbd9ed20/a">559edbd9ed20</a> </td>
+   <td><a href="/file/0cd96de13884/a">0cd96de13884</a> </td>
   </tr>
   <tr>
    <th>children</th>
@@ -870,7 +870,7 @@
   </tr>
   <tr>
    <th>parents</th>
-   <td><a href="/file/d73db4d812ff/a">d73db4d812ff</a> </td>
+   <td><a href="/file/0cd96de13884/a">0cd96de13884</a> </td>
   </tr>
   <tr>
    <th>children</th>