Show More
@@ -109,6 +109,8 b' def file(web, req, tmpl):' | |||||
109 | raise inst |
|
109 | raise inst | |
110 |
|
110 | |||
111 | def _search(web, req, tmpl): |
|
111 | def _search(web, req, tmpl): | |
|
112 | MODE_REVISION = 'rev' | |||
|
113 | MODE_KEYWORD = 'keyword' | |||
112 |
|
114 | |||
113 | def revsearch(ctx): |
|
115 | def revsearch(ctx): | |
114 | yield ctx |
|
116 | yield ctx | |
@@ -142,17 +144,17 b' def _search(web, req, tmpl):' | |||||
142 | yield ctx |
|
144 | yield ctx | |
143 |
|
145 | |||
144 | searchfuncs = { |
|
146 | searchfuncs = { | |
145 |
|
|
147 | MODE_REVISION: revsearch, | |
146 |
|
|
148 | MODE_KEYWORD: keywordsearch, | |
147 | } |
|
149 | } | |
148 |
|
150 | |||
149 | def getsearchmode(query): |
|
151 | def getsearchmode(query): | |
150 | try: |
|
152 | try: | |
151 | ctx = web.repo[query] |
|
153 | ctx = web.repo[query] | |
152 | except (error.RepoError, error.LookupError): |
|
154 | except (error.RepoError, error.LookupError): | |
153 |
return |
|
155 | return MODE_KEYWORD, query | |
154 | else: |
|
156 | else: | |
155 |
return |
|
157 | return MODE_REVISION, ctx | |
156 |
|
158 | |||
157 | def changelist(**map): |
|
159 | def changelist(**map): | |
158 | count = 0 |
|
160 | count = 0 |
General Comments 0
You need to be logged in to leave comments.
Login now