[Bps-public-commit] r14904 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Aug 7 16:40:03 EDT 2008


Author: sartak
Date: Thu Aug  7 16:40:02 2008
New Revision: 14904

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI/Command/Merge.pm

Log:
 r68952 at onn:  sartak | 2008-08-07 16:39:47 -0400
 If the user specifies --verbose, then display each changeset as it is pulled


Modified: Prophet/trunk/lib/Prophet/CLI/Command/Merge.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Merge.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Merge.pm	Thu Aug  7 16:40:02 2008
@@ -58,11 +58,25 @@
                    ? 'Prophet::Resolver::AlwaysSource'
                    : ();
 
-    $target->import_changesets(
+    my %import_args = (
         from  => $source,
         resdb => $self->app_handle->resdb_handle,
         force => $self->has_arg('force'),
-        ( $resolver ? (resolver_class => $resolver) : () ),
+    );
+
+    $import_args{resolver_class} = $resolver
+        if $resolver;
+
+    if ($self->has_arg('verbose')) {
+        $import_args{reporting_callback} = sub {
+            my %args = @_;
+            my $changeset = $args{changeset};
+            print $changeset->as_string;
+        };
+    }
+
+    $target->import_changesets(
+        %import_args,
     );
 }
 



More information about the Bps-public-commit mailing list