#1269: Search an expression with CamelCase does not work
-------------------------------------+--------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: cboos
Type: defect | Status: assigned
Priority: normal | Milestone: 0.10
Component: search system | Version: 0.8.1
Severity: minor | Resolution:
Keywords: search CamelCase |
-------------------------------------+--------------------------------------
Comment (by athomas):
Seems there are two issues here:
1. Disabling quick jumps (solved with the `!` prefix)
2. An extensible/consistent way of adding quick jumps
This ticket only deals with the first of these and is easily solvable:
{{{
#!diff
Index: trac/Search.py
===================================================================
--- trac/Search.py (revision 3370)
+++ trac/Search.py (working copy)
@@ -164,10 +164,10 @@
if query:
page = int(req.args.get('page', '1'))
redir = self.quickjump(req, query)
- if redir:
+ if query.startswith('!'):
+ query = query[1:]
+ elif redir:
req.redirect(redir)
- elif query.startswith('!'):
- query = query[1:]
terms = search_terms(query)
# Refuse queries that obviously would result in a huge result
set
if len(terms) == 1 and len(terms[0]) < 3:
}}}
Perhaps we should close this for [milestone:0.10 0.10] and move discussion
of 2 to another ticket?
Personally I'm -1 on adding a conditional check for existence because of
the extra ''magic''. For example, I'd prefer `r9999` to tell me the
changeset doesn't exist rather than perform a search.
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/1269>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets