sheehan planned changes to this revision. sheehan added a comment.
In https://phab.mercurial-scm.org/D4283#65988, @indygreg wrote: > This seems like a strict improvement. > > But the proper way to register web commands from extensions would be to go through the `registrar` API and have the extension loader look for a well-named symbol in each extension module that is loaded and hgweb would consult the registrar for active commands. In theory, this will only activate web commands on repositories that have an extension loaded. > > Search for `templatefilter` in `mercurial/extensions.py` for an example of how all this works. > > Would you be willing to try that approach? It doesn't have to be perfect. But we are moving to the registrar for extensions wishing to install well-defined things. And web commands fit that bill. Seems reasonable to me! I took a look through the code and I think I understand what is going on. I'll update this patch with something that uses the registrar API. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4283 To: sheehan, #hg-reviewers Cc: indygreg, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel