##// END OF EJS Templates
hgweb: allow urls to be shorter by using shortcuts...
Benoit Boissinot -
r1406:34cb3957 default
parent child Browse files
Show More
@@ -704,9 +704,23 b' class hgweb:'
704 704
705 705 def footer(**map):
706 706 yield self.t("footer", **map)
707
708 def expand_form(form):
709 shortcuts = {
710 'cs': [('cmd', ['changeset']), ('node', None)],
711 }
712 for k in shortcuts.iterkeys():
713 if form.has_key(k):
714 for name, value in shortcuts[k]:
715 if value is None:
716 value = form[k]
717 form[name] = value
718 del form[k]
707 719
708 720 self.refresh()
709 721
722 expand_form(req.form)
723
710 724 t = self.repo.ui.config("web", "templates", templatepath())
711 725 m = os.path.join(t, "map")
712 726 style = self.repo.ui.config("web", "style", "")
General Comments 0
You need to be logged in to leave comments. Login now