Re: [PATCH] add an option to htags for specifing "?view=" in viewcvs URL
Hideki IWAMOTO <[email protected]>
| Newsgroups | gmane.comp.gnu.global.bugs |
|---|---|
| Message-ID | <[email protected]> |
Viewcvs version 0.9 and freebsd cvsweb simply ignore unknown parameters. Therefore there was no problem adding "?view=log" unconditionally, and adding a new option is unnecessary. Revised patch is attached. htags/src2html.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) On Fri, 16 Dec 2016 23:39:25 +0900 Hideki IWAMOTO <[email protected]> wrote: > Hi. > > The attached patch adds an option to htags for specifing the value of parameter "view" > in viewcvs URL. > "?view=log" is required when accessing the viewvc server that default_file_view > configuration option is not set to "log". > > > diffstat: > htags/htags.c | 6 ++++++ > htags/htags.h | 1 + > htags/manual.in | 2 ++ > htags/src2html.c | 4 ++++ > 4 files changed, 13 insertions(+) > > -- > Hideki IWAMOTO <[email protected]> -- Hideki IWAMOTO <[email protected]> _______________________________________________ Bug-global mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-global
cvsweb-url-view-param.patch
(application/octet-stream, 626 B)
Index: htags/src2html.c
===================================================================
RCS file: /sources/global/global/htags/src2html.c,v
retrieving revision 1.86
diff -u -p -r1.86 src2html.c
--- htags/src2html.c 15 Dec 2016 13:32:36 -0000 1.86
+++ htags/src2html.c 16 Dec 2016 19:07:24 -0000
@@ -840,8 +840,10 @@ src2html(const char *src, const char *ht
} else {
encode(sb, src);
}
+ strbuf_puts(sb, "?view=log");
if (cvsweb_cvsroot) {
- strbuf_puts(sb, "?cvsroot=");
+ strbuf_puts(sb, quote_amp);
+ strbuf_puts(sb, "cvsroot=");
strbuf_puts(sb, cvsweb_cvsroot);
}
fputs(quote_space, out);