Show More
@@ -14,6 +14,21 b' from common import ErrorResponse, get_mt' | |||
|
14 | 14 | from request import wsgirequest |
|
15 | 15 | import webcommands |
|
16 | 16 | |
|
17 | shortcuts = { | |
|
18 | 'cl': [('cmd', ['changelog']), ('rev', None)], | |
|
19 | 'sl': [('cmd', ['shortlog']), ('rev', None)], | |
|
20 | 'cs': [('cmd', ['changeset']), ('node', None)], | |
|
21 | 'f': [('cmd', ['file']), ('filenode', None)], | |
|
22 | 'fl': [('cmd', ['filelog']), ('filenode', None)], | |
|
23 | 'fd': [('cmd', ['filediff']), ('node', None)], | |
|
24 | 'fa': [('cmd', ['annotate']), ('filenode', None)], | |
|
25 | 'mf': [('cmd', ['manifest']), ('manifest', None)], | |
|
26 | 'ca': [('cmd', ['archive']), ('node', None)], | |
|
27 | 'tags': [('cmd', ['tags'])], | |
|
28 | 'tip': [('cmd', ['changeset']), ('node', ['tip'])], | |
|
29 | 'static': [('cmd', ['static']), ('file', None)] | |
|
30 | } | |
|
31 | ||
|
17 | 32 | def _up(p): |
|
18 | 33 | if p[0] != "/": |
|
19 | 34 | p = "/" + p |
@@ -123,21 +138,6 b' class hgweb(object):' | |||
|
123 | 138 | |
|
124 | 139 | # expand form shortcuts |
|
125 | 140 | |
|
126 | shortcuts = { | |
|
127 | 'cl': [('cmd', ['changelog']), ('rev', None)], | |
|
128 | 'sl': [('cmd', ['shortlog']), ('rev', None)], | |
|
129 | 'cs': [('cmd', ['changeset']), ('node', None)], | |
|
130 | 'f': [('cmd', ['file']), ('filenode', None)], | |
|
131 | 'fl': [('cmd', ['filelog']), ('filenode', None)], | |
|
132 | 'fd': [('cmd', ['filediff']), ('node', None)], | |
|
133 | 'fa': [('cmd', ['annotate']), ('filenode', None)], | |
|
134 | 'mf': [('cmd', ['manifest']), ('manifest', None)], | |
|
135 | 'ca': [('cmd', ['archive']), ('node', None)], | |
|
136 | 'tags': [('cmd', ['tags'])], | |
|
137 | 'tip': [('cmd', ['changeset']), ('node', ['tip'])], | |
|
138 | 'static': [('cmd', ['static']), ('file', None)] | |
|
139 | } | |
|
140 | ||
|
141 | 141 | for k in shortcuts.iterkeys(): |
|
142 | 142 | if k in req.form: |
|
143 | 143 | for name, value in shortcuts[k]: |
General Comments 0
You need to be logged in to leave comments.
Login now