[Bps-public-commit] r8697 - in SVKUI: . trunk/lib/SVKUI/Model trunk/share/web/templates trunk/share/web/templates/fragments

clsung at bestpractical.com clsung at bestpractical.com
Wed Aug 22 22:17:25 EDT 2007


Author: clsung
Date: Wed Aug 22 22:17:24 2007
New Revision: 8697

Added:
   SVKUI/trunk/share/web/templates/event
   SVKUI/trunk/share/web/templates/fragments/
   SVKUI/trunk/share/web/templates/fragments/time
Modified:
   SVKUI/   (props changed)
   SVKUI/trunk/lib/SVKUI/Model/Project.pm
   SVKUI/trunk/share/web/templates/project/index.html

Log:
 r8736 at going04:  clsung | 2007-08-23 01:13:16 +0800
 - use child process to examine the sync process
 r8737 at going04:  clsung | 2007-08-23 09:59:34 +0800
 - using peek
 r8738 at going04:  clsung | 2007-08-23 09:59:58 +0800
 - demo of Pub/Sub


Modified: SVKUI/trunk/lib/SVKUI/Model/Project.pm
==============================================================================
--- SVKUI/trunk/lib/SVKUI/Model/Project.pm	(original)
+++ SVKUI/trunk/lib/SVKUI/Model/Project.pm	Wed Aug 22 22:17:24 2007
@@ -98,6 +98,22 @@
 sub try_sync {
     my $self = shift;
     warn 'svk sync '.$self->repospath;
+    my $pid;
+    if ($pid = fork) {
+    } else {
+	while (!$self->synced) {
+	    my $line = SVKUI->peek->getline;
+	    #Syncing https://opensvn.csie.org/elixus
+	    #Retrieving log information from 1 to 73
+	    warn "hi";
+	    if ($line) {
+		warn $line;
+		SVKUI::Event::Notification->new($line)->publish;
+	    }
+	    sleep 0.5;
+	}
+	exit;
+    }
     if (SVKUI->_svkcmd('sync', $self->repospath)) {
 	warn 'svk sync '.$self->repospath.' fail!';
 	return 1;

Added: SVKUI/trunk/share/web/templates/event
==============================================================================
--- (empty file)
+++ SVKUI/trunk/share/web/templates/event	Wed Aug 22 22:17:24 2007
@@ -0,0 +1,21 @@
+<&| /_elements/wrapper, title => "Hi", subtitle => "Welcome" &>
+<table>
+<tr><td>
+Full: <% $region->render %>
+</td></tr>
+</table>
+</&>
+<%init>
+my $region = Jifty::Web::PageRegion->new(
+    name => "clock-time",
+    path => '/__jifty/empty',
+);
+
+Jifty->subs->add(
+    class       => 'Notification',
+    mode        => 'Replace',
+    region      => "clock-time",
+    render_with => '/fragments/time',
+);
+
+</%init>

Added: SVKUI/trunk/share/web/templates/fragments/time
==============================================================================
--- (empty file)
+++ SVKUI/trunk/share/web/templates/fragments/time	Wed Aug 22 22:17:24 2007
@@ -0,0 +1,4 @@
+<span><% $$event %></span>
+<%ARGS>
+$event
+</%ARGS>

Modified: SVKUI/trunk/share/web/templates/project/index.html
==============================================================================
--- SVKUI/trunk/share/web/templates/project/index.html	(original)
+++ SVKUI/trunk/share/web/templates/project/index.html	Wed Aug 22 22:17:24 2007
@@ -3,7 +3,8 @@
 $message => undef
 </%args>
 <%init>
-my $output = SVKUI->output;
+my @outputs = SVKUI->peek->getlines;
+my $output = join "", @outputs;
 my $edit = Jifty->web->new_action(class =>'UpdateProject', record => $mirror);
 </%init>
 <&|/_elements/wrapper,title => $mirror->name &>



More information about the Bps-public-commit mailing list