Bug 5879 - hgweb search for revset keyword search treated as literal keyword search
Summary: hgweb search for revset keyword search treated as literal keyword search
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: hgweb (show other bugs)
Version: 4.6
Hardware: PC Linux
: urgent bug
Assignee: Bugzilla
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-05-09 12:44 UTC by Kim "Zash" Alvefur
Modified: 2018-05-19 00:00 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kim "Zash" Alvefur 2018-05-09 12:44 UTC
Given a history like:

o bookmark: some-feature
|
o some-change
|
o stable
:

Such that
`hg log -r some-feature%stable` 
lists the two first commits.

A search in hgweb however lists nothing and says:
> Assuming literal keyword search.
Comment 1 Kim "Zash" Alvefur 2018-05-09 12:48 UTC
However as found by TheMystic on IRC, a search for a feature%stable works, suggesting that the dash has something to do with it.
Comment 2 Kim "Zash" Alvefur 2018-05-09 14:01 UTC
According to bisect:

The first bad revision is:
changeset:   37700:f83cb91b052e
user:        Yuya Nishihara <yuya@tcha.org>
date:        Sat Apr 14 12:57:32 2018 +0900
summary:     revset: pass in lookup function instead of repo (API)
Comment 3 Yuya Nishihara 2018-05-10 06:56 UTC
Can't reproduce with "hg serve". Which web interface and extensions did
you test with?
Comment 4 Kevin Bullock 2018-05-10 14:50 UTC
I tested with `hg serve` in 4.6 and on default (yesterday). More specifically:

1. Set a bookmark with a hyphen in the name. I used the hg repo itself and set a bookmark called 'dash-stable' on the head of 'stable'. (Maybe bookmarks have to be involved?)

2. Search for 'dash-stable%default' in hgweb (run via 'hg serve'). The results returned say "Assuming literal keyword search."
Comment 5 Yuya Nishihara 2018-05-11 06:50 UTC
Silly me. My test repo had "foo" and "bar" bookmarks while testing "foo-bar%."
query. Even worse, "bar" was invisible because it points to the null revision. :)

I'll send a fix shortly.
Comment 6 HG Bot 2018-05-11 14:35 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/edb28a6d95b7
Yuya Nishihara <yuya@tcha.org>
revset: pass in lookup function to matchany() (issue5879)

Silly mistake in f83cb91b052e.

(please test the fix)
Comment 7 Bugzilla 2018-05-19 00:00 UTC
Bug was set to TESTING for 7 days, resolving