Package: hiki Followup-For: Bug #378059 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Attached is my backport of the patch in 0.8.6 for 0.6.5. The recommended timeout is 30 seconds; this is set in a configuration option in hiki 0.8.x, but that configuration framework doesn't seem to be present in 0.6.5. My Ruby isn't great and I didn't see how to access variables from hikiconf.rb in hiki/command.rb. This patch wraps the diff function in a 30 second timeout as r1.81 of command.rb does, but it is hard coded and not a configuration parameter. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEtczeAud/2YgchcQRAlJCAJsEhkWLz231r9NK1f0otPim24ZzQwCgq5NS HzJTcPgvlKmUkhvAqkf7od0= =kHIy -----END PGP SIGNATURE-----
diff -ur hiki-0.6.5-orig/hiki/command.rb hiki-0.6.5/hiki/command.rb --- hiki-0.6.5-orig/hiki/command.rb 2004-06-26 10:11:23.000000000 -0400 +++ hiki-0.6.5/hiki/command.rb 2006-07-13 00:22:26.214947250 -0400 @@ -2,7 +2,7 @@ # Copyright (C) 2002-2004 TAKEUCHI Hitoshi <[EMAIL PROTECTED]> require 'amrita/template' - +require 'timeout' require 'hiki/page' require 'hiki/util' require 'hiki/plugin' @@ -56,6 +56,7 @@ end def dispatch + Timeout::timeout(30) { @cmd = 'view' unless @cmd begin raise if [EMAIL PROTECTED] && ['view', 'edit', 'diff', 'save'].index( @cmd ) @@ -88,6 +89,7 @@ # @p = 'FrontPage' # cmd_view end + } end private