r23215 - in /scripts/qa: DebianQA/Config.pm debianqa.conf-sample qareport.cgi templates/by_category
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Tue Jul 15 09:46:38 UTC 2008
Author: dmn
Date: Tue Jul 15 09:46:35 2008
New Revision: 23215
URL: http://svn.debian.org/wsvn/?sc=1&rev=23215
Log:
Make SCM links SCM-agnostic (controlled via config)
Modified:
scripts/qa/DebianQA/Config.pm
scripts/qa/debianqa.conf-sample
scripts/qa/qareport.cgi
scripts/qa/templates/by_category
Modified: scripts/qa/DebianQA/Config.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Config.pm?rev=23215&op=diff
==============================================================================
--- scripts/qa/DebianQA/Config.pm (original)
+++ scripts/qa/DebianQA/Config.pm Tue Jul 15 09:46:35 2008
@@ -24,8 +24,11 @@
default_template => "by_category",
group_name => "Unnamed Packaging Group",
group_url => "http://www.debian.org/",
- wsvn_url => undef,
- viewsvn_url => undef,
+ scm_web_dir => undef,
+ scm_web_file => undef,
+ # deprecated
+ viewsvn_url => undef,
+ wsvn_url => undef,
default_show_all => undef,
default_start_collapsed => undef,
default_hide_binaries => undef,
@@ -128,6 +131,22 @@
$CFG{$section}{$key} = $val;
}
close CFG;
+
+ ## provide backward-compatibility with instances that still use (w|view)svn
+ # file
+ $CFG{qareport_cgi}{svm_web_file} ||=
+ $CFG{qareport}{viewsvn_url}.'?view=markup'
+ if $CFG{qareport_cgi}{viewsvn_url};
+ $CFG{qareport_cgi}{svm_web_file} ||=
+ $CFG{qareport}{wsvn_url}.'/?op=file&rev=0&sc='
+ if $CFG{qareport_cgi}{wsvn_url};
+ # dir
+ $CFG{qareport_cgi}{svm_web_dir} ||=
+ $CFG{qareport}{viewsvn_url}.'/?'
+ if $CFG{qareport_cgi}{viewsvn_url};
+ $CFG{qareport_cgi}{svm_web_dir} ||=
+ $CFG{qareport}{wsvn_url}.'/?rev=0&sc='
+ if $CFG{qareport_cgi}{wsvn_url};
}
# Parses command line options, loads configuration file if specified, removes
# arguments from @ARGV and returns a hash with the parsed options.
Modified: scripts/qa/debianqa.conf-sample
URL: http://svn.debian.org/wsvn/scripts/qa/debianqa.conf-sample?rev=23215&op=diff
==============================================================================
--- scripts/qa/debianqa.conf-sample (original)
+++ scripts/qa/debianqa.conf-sample Tue Jul 15 09:46:35 2008
@@ -9,10 +9,12 @@
default_template = by_category
group_name = Debian Foo Group
group_url = http://pkg-foo.alioth.debian.org/
-; sprintf format for the package wsvn location, takes one parameter, the
-; package directory.
-;viewsvn_url = http://svn.debian.org/viewsvn/pkg-foo/trunk/%s
-;wsvn_url = http://svn.debian.org/wsvn/pkg-foo/trunk/%s
+; sprintf format for the package SCM web location, takes one parameter, the
+; package directory/file. Samples are for ViewSVN (recommended) and WebSVN
+;scm_web_dir = http://svn.debian.org/viewsvn/pkg-foo/trunk/%s?
+;scm_web_dir = http://svn.debian.org/wsvn/pkg-foo/trunk/%s/?rev=0&sc=0
+;scm_web_file = http://svn.debian.org/viewsvn/pkg-foo/trunk/%s?view=markup
+;scm_web_file = http://svn.debian.org/wsvn/pkg-foo/trunk/%s/?op=file&rev=0&sc=0
; Defaults for CGI options
;default_show_all = 0
;default_start_collapsed = 0
Modified: scripts/qa/qareport.cgi
URL: http://svn.debian.org/wsvn/scripts/qa/qareport.cgi?rev=23215&op=diff
==============================================================================
--- scripts/qa/qareport.cgi (original)
+++ scripts/qa/qareport.cgi Tue Jul 15 09:46:35 2008
@@ -171,8 +171,11 @@
group_email => $CFG{common}{group_email},
group_name => $CFG{qareport_cgi}{group_name},
group_url => $CFG{qareport_cgi}{group_url},
- wsvn_url => $CFG{qareport_cgi}{wsvn_url},
- viewsvn_url => $CFG{qareport_cgi}{viewsvn_url},
+ scm_web_file=> $CFG{qareport_cgi}{scm_web_file},
+ scm_web_dir => $CFG{qareport_cgi}{scm_web_dir},
+ # deprecated, but still used for compatibility
+ wsvn_url => $CFG{qareport_cgi}{wsvn_url},
+ viewsvn_url => $CFG{qareport_cgi}{viewsvn_url},
(
( ($params{'format'}||'') eq 'list' )
? (
Modified: scripts/qa/templates/by_category
URL: http://svn.debian.org/wsvn/scripts/qa/templates/by_category?rev=23215&op=diff
==============================================================================
--- scripts/qa/templates/by_category (original)
+++ scripts/qa/templates/by_category Tue Jul 15 09:46:35 2008
@@ -104,30 +104,6 @@
[% END #IF bugs %]
[% END #BLOCK bts_link %]
-[% BLOCK file_in_svn %]
- [% IF wsvn_url %]
- [% pkg.svn.dir | format("$wsvn_url")
- %]/$file?op=file&rev=0&sc=0
- [% ELSE %]
- [% IF viewsvn_url %]
- [% pkg.svn.dir | format("$viewsvn_url")
- %]/$file?view=markup
- [% END %]
- [% END %]
-[% END #BLOCK file_in_svn %]
-
-[% BLOCK dir_in_svn %]
- [% IF wsvn_url %]
- [% pkg.svn.dir | format("$wsvn_url")
- %]/$dir?rev=0&sc=0
- [% ELSE %]
- [% IF viewsvn_url %]
- [% pkg.svn.dir | format("$viewsvn_url")
- %]/$dir?
- [% END %]
- [% END %]
-[% END #BLOCK dir_in_svn %]
-
[% BLOCK package %]
[% SET arch_ver = pkg.archive.most_recent %]
[% SET arch_src = pkg.archive.most_recent_src %]
@@ -164,7 +140,8 @@
</td>
<td[% IF pkg.hilight.svn %] class="todo"[% END %]>
- [% chlog_url = BLOCK %][% INCLUDE file_in_svn file="debian/changelog" %][% END %]
+ [% chlog_url = BLOCK %][% "${pkg.svn.dir}/debian/changelog" |
+ format(scm_web_file) | url %][% END %]
<span class="popup svn-rel"><a href="$chlog_url">$svn_ver</a><span
id="${pkg.svn.dir}_rel_chlog_balloon" class="balloon"><a
href="javascript:async_get(
@@ -224,10 +201,11 @@
[% IF pkg.watch.upstream_dir %] <a href="$pkg.watch.upstream_dir"
class="watch-up-dir">(browse)</a> [% END %] [% IF
pkg.hilight.upstream %] [% IF pkg.watch.error %] <a href="[%
- INCLUDE file_in_svn file='debian/copyright' %]"
+ "${pkg.svn.dir}/debian/copyright" | format(scm_web_file) | url %]"
class="watch-cp-info">(copyright info)</a> [% END %] [% IF
pkg.watch.error != "Missing" AND ! pkg.status.needs_upgrade %]
- <a href="[% INCLUDE file_in_svn file='debian/watch' %]"
+ <a href="[% "${pkg.svn.dir}/debian/watch" |
+ format(scm_web_file) | url %]"
class="watch-file">(watchfile)</a> [% END %] [% END %] </td>
</tr> [% END #BLOCK package %]
More information about the Pkg-perl-cvs-commits
mailing list