[PATCH] gitweb: show transplant source in changeset info

Patrick Mézard pmezard at gmail.com
Fri Mar 21 18:20:21 CDT 2008


Thomas Arendsen Hein a écrit :
> * Florent Guillaume <fg at nuxeo.com> [20080316 00:32]:
>> # HG changeset patch
>> # User Florent Guillaume <fg at nuxeo.com>
>> # Date 1205622898 -3600
>> # Node ID 53f336b0d289e9a22e76f24f8841680c8fa15999
>> # Parent  c50ac875ffcb8ae53beeeeee119a4dae677c4d23
>> gitweb: show transplant source in changeset info
> 
> I'd like to have a more generic solution here:
> Extensions should be able to add formatters for extra values. hg log
> and hgweb shoukd be able to use e.g. #extras# in a template to show
> all these values if the corresponding extension is loaded.

Declaring extra formatters like commands looks better than registering them explicitely, documentation generation is easier and we can bind them to keywords which may scale better than calling every available formatter on extra for every revision. The hard part with Florent formatters is they are conditional, the transplanted boxes are shown only if the transplanted revision belong to the same repository. Conditional evaluation can be very useful. For instance, when displaying converted revisions a "r1024 - " prefix could be added only if an svn extra is present, instead of an empty "r -". Maybe that's pushing the templater a little too far, I don't know.

--
Patrick Mézard


More information about the Mercurial-devel mailing list