diff -r 83147ff53112 -r 9c37df347485 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Mon Jul 11 13:53:35 2016 +0200 +++ b/mercurial/hgweb/webcommands.py Tue Jun 28 11:42:42 2016 +0200 @@ -864,6 +864,13 @@ diffopts = patch.difffeatureopts(web.repo.ui, untrusted=True, section='annotate', whitespace=True) + def parents(f): + for p in f.parents(): + yield { + "node": p.hex(), + "rev": p.rev(), + } + def annotate(**map): if util.binary(fctx.data()): mt = (mimetypes.guess_type(fctx.path())[0] @@ -882,6 +889,7 @@ "node": f.hex(), "rev": rev, "author": f.user(), + "parents": parents(f), "desc": f.description(), "extra": f.extra(), "file": f.path(),