[svk-commit] r2965 - trunk/lib/SVK/Path

nobody at bestpractical.com nobody at bestpractical.com
Fri Jul 4 07:59:24 EDT 2008


Author: ruz
Date: Fri Jul  4 07:59:24 2008
New Revision: 2965

Modified:
   trunk/lib/SVK/Path/Checkout.pm

Log:
* handle type provided by merge editor into cb_conflict
* store conflict types in .conflict property

Modified: trunk/lib/SVK/Path/Checkout.pm
==============================================================================
--- trunk/lib/SVK/Path/Checkout.pm	(original)
+++ trunk/lib/SVK/Path/Checkout.pm	Fri Jul  4 07:59:24 2008
@@ -334,11 +334,16 @@
         },
 
         cb_conflict => sub {
-            my ($path) = @_;
+            my ($path, $type) = @_;
+            return if $arg{check_only};
+
             my $copath;
             ($path, $copath) = $self->_get_paths($path);
-            $self->xd->{checkout}->store ($copath, {'.conflict' => 1})
-                unless $arg{check_only};
+            my $conflict = $self->xd->{checkout}->get ($copath, 1)->{'.conflict'} || '';
+            $conflict = 'node' if $conflict eq '1';
+            my %seen;
+            $conflict = join ',', grep !$seen{$_}++, $type, split /,/, $conflict;
+            $self->xd->{checkout}->store ($copath, {'.conflict' => $conflict});
         },
         cb_add_merged => sub { 
             return if $arg{check_only};


More information about the svk-commit mailing list