simple thg revision set query fails although hg works

Issue #2019 resolved
Christian Feuersaenger
created an issue

This bug is for TortoiseHg version 2.3.1 with Mercurial-2.1.1, Python-2.6.6, PyQt-4.8.6, Qt-4.7.4 . I hope this is the correct bug tracking system.

I have a repository containing both changesets 33cec7b4b2a9 and 9f4ff37f1577 where 33cec is an ancestor of 9f4ff.

Opening the filter toolbar return the expected result for '33cec7b4b2a9' and for '9f4ff37f1577'.

PROBLEM: searching for '33cec7b4b2a9 or 9f4ff37f1577' does NOT find any results. I also tried '33cec7b4b2a9::9f4ff37f1577' and got no results.


$ hg log -r "33cec7b4b2a9 or 9f4ff37f1577"


$ hg log -r "33cec7b4b2a9::9f4ff37f1577"

works, however. I tried both the filter toolbar and the revision set query editor (the one opened after hitting '..') with the same success.

Interestingly, the query 'descendants(33cec7b4b2a9) and ancestors(9f4ff37f1577)' works and returns the expected results!

Comments (3)

  1. Wagner Bruna

    This is more-or-less working as intended: see :

    "The Workbench will attempt to lookup the entered search phrase in the repository to see if it matches a tag, bookmark, branch name, changeset hash, or revision number. If no changeset match is found, the Workbench checks if the search phrase has any parentheses. If no parentheses are found, the Workbench assumes the search is a keyword and performs a keyword() revision set search. If parentheses are found, the Workbench assumes the search phrase is a revision set specification and attempts to resolve the set."

    So please see if "(33cec7b4b2a9::9f4ff37f1577)" works for you.

    Anyway, IMHO TortoiseHg should give some kind of visual feedback to make it clear it is actually doing a keyword match. Perhaps the filter text could be replaced by 'keyword("text")'?

  2. Christian Feuersaenger reporter

    Thanks for the explanation - that explains a lot. In fact, enclosing my revset query in parentheses works as expected.

    Given your manual quote, I have to admit that I did not read it thoroughly - given the fact the that THG revset query editor has a short online-help in its lower right corner, I figured that everything that is explained in that reference would be accepted as input query.

    That said, I would encourage you to avoid changes to the actual filter text.

    But I would say that it your idea to improve the reporting is the correct solution: it would probably suffice if you would write the *actually executed* query into the status bar. At least if it is not the same as the input query.

    Perhaps : Searching [xxxxx ] Running query keyword("33cec7b4b2a9::9f4ff37f1577") ...

    followed by

    No matches found for query keyword("33cec7b4b2a9::9f4ff37f1577")

    Ideally, your proposed solution (namely to enclose the query in parentheses) would be part of the reporting. Perhaps

    No matches found for query keyword("33cec7b4b2a9::9f4ff37f1577") (did you mean "(33cec7b4b2a9::9f4ff37f1577)" ?)

  3. Log in to comment