[svk-commit] r2966 - trunk/lib/SVK/Editor

nobody at bestpractical.com nobody at bestpractical.com
Fri Jul 4 08:01:22 EDT 2008


Author: ruz
Date: Fri Jul  4 08:01:22 2008
New Revision: 2966

Modified:
   trunk/lib/SVK/Editor/Status.pm

Log:
* don't announce prop changes if node has been added or replaced
  as it's not what we want and as well node's status has been
  flushed already

Modified: trunk/lib/SVK/Editor/Status.pm
==============================================================================
--- trunk/lib/SVK/Editor/Status.pm	(original)
+++ trunk/lib/SVK/Editor/Status.pm	Fri Jul  4 08:01:22 2008
@@ -98,6 +98,7 @@
     else {
 	$self->notify->node_status ($path, 'A');
     }
+    $self->{info}{$path}{added_or_replaced} = 1;
 }
 
 sub add_file {
@@ -123,12 +124,14 @@
 
 sub change_file_prop {
     my ($self, $path, $name, $value) = @_;
-    $self->notify->prop_status ($path, 'M');
+    $self->notify->prop_status ($path, 'M')
+        unless $self->{info}{$path}{added_or_replaced};
 }
 
 sub close_file {
     my ($self, $path) = @_;
     $self->notify->flush ($path);
+    delete $self->{info}{$path};
 }
 
 sub absent_file {
@@ -165,12 +168,14 @@
 
 sub change_dir_prop {
     my ($self, $path, $name, $value) = @_;
-    $self->notify->prop_status ($path, 'M');
+    $self->notify->prop_status ($path, 'M')
+        unless $self->{info}{$path}{added_or_replaced};
 }
 
 sub close_directory {
     my ($self, $path) = @_;
     $self->notify->flush_dir ($path);
+    delete $self->{info}{$path};
 }
 
 sub open_node {


More information about the svk-commit mailing list