comparison mercurial/hgweb/webcommands.py @ 23740:9e1f4c65f5f5

hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904) This adds UI portion of the feature that has resided in mercurial since 2012. Back then the interface was added together with the code, but was shortly backed out because it was deemed "not ready". Code, however, stayed. For the original feature and its implementation, see issue2810 and d605a82cf189. In short, the backed-out interface had two outstanding issues: 1. it was introducing an entirely new term (baseline) and 2. it was present on every changeset's page, even for changesets with 1 parent (or no parents), which didn't make sense This patch implements a hopefully better interface because: 1. it uses the usual terms (diff) and 2. it only shows up when there actually are 2 parents.
author Anton Shestakov <engored@ya.ru>
date Sat, 03 Jan 2015 17:50:21 +0800
parents 4fedf2a9b538
children 513d47905114
comparison
equal deleted inserted replaced
23739:b8b246cffdee 23740:9e1f4c65f5f5
377 377
378 return tmpl('changeset', 378 return tmpl('changeset',
379 diff=diffs, 379 diff=diffs,
380 rev=ctx.rev(), 380 rev=ctx.rev(),
381 node=ctx.hex(), 381 node=ctx.hex(),
382 parent=webutil.parents(ctx), 382 parent=tuple(webutil.parents(ctx)),
383 child=webutil.children(ctx), 383 child=webutil.children(ctx),
384 basenode=basectx.hex(), 384 basenode=basectx.hex(),
385 changesettag=showtags, 385 changesettag=showtags,
386 changesetbookmark=showbookmarks, 386 changesetbookmark=showbookmarks,
387 changesetbranch=showbranch, 387 changesetbranch=showbranch,