[packages/viewvc] support cvsweb f= parameter
glen
glen at pld-linux.org
Sun Jun 14 21:07:17 CEST 2015
commit 9110b79e6d950e1a315e08661c7416c26f94b772
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Jun 14 22:06:58 2015 +0300
support cvsweb f= parameter
cvsweb-compat.patch | 27 +++++++++++++++++++++++++++
viewvc.spec | 4 +++-
2 files changed, 30 insertions(+), 1 deletion(-)
---
diff --git a/viewvc.spec b/viewvc.spec
index 14e71e2..1269546 100644
--- a/viewvc.spec
+++ b/viewvc.spec
@@ -4,12 +4,13 @@ Summary: Browser interface for CVS and Subversion version control repositories
Summary(pl.UTF-8): Interfejs przeglądarki do repozytoriów systemów kontroli wersji CVS i Subversion
Name: viewvc
Version: 1.1.23
-Release: 1
+Release: 2
License: BSD
Group: Applications/WWW
Source0: http://viewvc.tigris.org/files/documents/3330/49392/%{name}-%{version}.tar.gz
# Source0-md5: 796aacdfcd8ab87a196d97df2691cd3f
Source1: apache.conf
+Patch0: cvsweb-compat.patch
URL: http://viewvc.org/
BuildRequires: python
BuildRequires: python-modules
@@ -162,6 +163,7 @@ ViewVC - szablon viewsvn
%prep
%setup -q
+%patch0 -p1
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/cvsweb-compat.patch b/cvsweb-compat.patch
new file mode 100644
index 0000000..2164884
--- /dev/null
+++ b/cvsweb-compat.patch
@@ -0,0 +1,27 @@
+--- viewvc-1.1.23/lib/viewvc.py 2014-11-05 02:16:15.000000000 +0200
++++ viewvc-1.1.23/lib/viewvc.py 2015-06-14 22:03:20.000000000 +0300
+@@ -683,6 +683,8 @@
+ 'sortdir' : _re_validate_alpha,
+ 'logsort' : _re_validate_alpha,
+ 'diff_format' : _re_validate_alpha,
++ # old cvsweb for 'diff_format' option
++ 'f' : _re_validate_alpha,
+ 'pathrev' : _re_validate_revnum,
+ 'dir_pagestart' : _re_validate_number,
+ 'log_pagestart' : _re_validate_number,
+@@ -2651,5 +2653,5 @@
+
+ def view_log(request):
+ cfg = request.cfg
+- diff_format = request.query_dict.get('diff_format', cfg.options.diff_format)
++ diff_format = request.query_dict.get('diff_format', request.query_dict.get('f', cfg.options.diff_format))
+ pathtype = request.pathtype
+@@ -3504,7 +3506,7 @@
+ diff_options = {}
+ human_readable = 0
+
+- format = query_dict.get('diff_format', cfg.options.diff_format)
++ format = query_dict.get('diff_format', query_dict.get('f', cfg.options.diff_format))
+ if format == 'c':
+ diff_type = vclib.CONTEXT
+ elif format == 's':
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/viewvc.git/commitdiff/9110b79e6d950e1a315e08661c7416c26f94b772
More information about the pld-cvs-commit
mailing list