Revset search syntax in hgweb

Alexander Plavin me at aplavin.ru
Tue Jul 9 12:20:07 CDT 2013


I've explored the way search is performed in different parts of
Mercurial, namely:
- hg log -r <revset expr>: the whole list of mathing changesets is
built first, even if last() is specified
- hg log -k <keyword> -l <limit> (and similar): works in a windowed
way, which gives result for small <limit> values fast
- current hgweb search: like previous item, but uses entirely separate
implementation (not sure why)

If my understanding is correct, then revset search always generate the
full list of matches first, so it is always be slower. Thus, I'm
planning to keep the current implementation of search of hgweb to use
it for non-revset cases, instead of building revset like 'keyword(a)
and keyword(b) ...', as it is faster. And for revset queries, the
search implementation from commands.log() will be used (much shorter
version of it, as there are no additional options in hgweb search).

Please confirm if I'm right or not here.


More information about the Mercurial-devel mailing list