mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
hgweb: add shortcuts for all the web commands / fix empty arg bug
This commit is contained in:
parent
35ec667f4d
commit
7a09f12a93
@ -291,7 +291,7 @@ class hgweb:
|
||||
for label, rev in l:
|
||||
yield {"label": label, "rev": rev}
|
||||
|
||||
yield {"label": "tip", "rev": ""}
|
||||
yield {"label": "tip", "rev": "tip"}
|
||||
|
||||
def changelist(**map):
|
||||
parity = (start - end) & 1
|
||||
@ -707,8 +707,18 @@ class hgweb:
|
||||
|
||||
def expand_form(form):
|
||||
shortcuts = {
|
||||
'cl': [('cmd', ['changelog']), ('rev', None)],
|
||||
'cs': [('cmd', ['changeset']), ('node', None)],
|
||||
'f': [('cmd', ['file']), ('filenode', None)],
|
||||
'fl': [('cmd', ['filelog']), ('filenode', None)],
|
||||
'fd': [('cmd', ['filediff']), ('node', None)],
|
||||
'fa': [('cmd', ['annotate']), ('filenode', None)],
|
||||
'mf': [('cmd', ['manifest']), ('manifest', None)],
|
||||
'ca': [('cmd', ['archive']), ('node', None)],
|
||||
'tags': [('cmd', ['tags'])],
|
||||
'tip': [('cmd', ['changeset']), ('node', ['tip'])],
|
||||
}
|
||||
|
||||
for k in shortcuts.iterkeys():
|
||||
if form.has_key(k):
|
||||
for name, value in shortcuts[k]:
|
||||
|
Loading…
Reference in New Issue
Block a user