Sun Mar 28 16:40:18 UTC 2010 Simon Michael <simon@joyful.com>
* allow custom "last" value in url, eg to view all patches on one page
{
hunk ./darcsweb.cgi 26
+PATCHES_PER_PAGE = 50
+
hunk ./darcsweb.cgi 1149
-def print_shortlog(last = 50, topi = 0, fname = None):
+def print_shortlog(last = PATCHES_PER_PAGE, topi = 0, fname = None):
hunk ./darcsweb.cgi 1223
-def print_log(last = 50, topi = 0):
+def print_log(last = PATCHES_PER_PAGE, topi = 0):
hunk ./darcsweb.cgi 1988
-def do_shortlog(topi):
+def do_shortlog(topi, last=PATCHES_PER_PAGE):
hunk ./darcsweb.cgi 1991
- print_shortlog(topi = topi)
+ print_shortlog(topi = topi, last = last)
hunk ./darcsweb.cgi 1994
-def do_filehistory(topi, f):
+def do_filehistory(topi, f, last=PATCHES_PER_PAGE):
hunk ./darcsweb.cgi 1997
- print_shortlog(topi = topi, fname = fname)
+ print_shortlog(topi = topi, fname = fname, last = last)
hunk ./darcsweb.cgi 2000
-def do_log(topi):
+def do_log(topi, last=PATCHES_PER_PAGE):
hunk ./darcsweb.cgi 2003
- print_log(topi = topi)
+ print_log(topi = topi, last = last)
hunk ./darcsweb.cgi 2537
- params = ['r', 'a', 'f', 'h', 'topi']
+ params = ['r', 'a', 'f', 'h', 'topi', 'last']
hunk ./darcsweb.cgi 2642
- do_shortlog(topi)
+ if form.has_key("last"):
+ last = int(filter_num(form["last"].value))
+ else:
+ last = PATCHES_PER_PAGE
+ do_shortlog(topi=topi,last=last)
hunk ./darcsweb.cgi 2654
- do_filehistory(topi, fname)
+ if form.has_key("last"):
+ last = int(filter_num(form["last"].value))
+ else:
+ last = PATCHES_PER_PAGE
+ do_filehistory(topi, fname, last=last)
hunk ./darcsweb.cgi 2665
- do_log(topi)
+ if form.has_key("last"):
+ last = int(filter_num(form["last"].value))
+ else:
+ last = PATCHES_PER_PAGE
+ do_log(topi, last=last)
}