Display syncs and roles when doing list db -vv
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 11 Oct 2011 02:53:10 +0000 (22:53 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 11 Oct 2011 02:53:10 +0000 (22:53 -0400)
bucardo

diff --git a/bucardo b/bucardo
index e6cd50ec3096b82e7457d11091c2c42d5fa4e341..2847184555991f68d1f1587b130a3f181e0f09d4 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -2294,16 +2294,11 @@ sub list_databases {
                 }
             }
 
-            ## Which syncs are using it (source vs. target)
-            if (exists $info->{sourcesync}) {
-                print '  Used as source in syncs: ';
-                print join ', ' => sort keys %{ $info->{sourcesync} };
-                print "\n";
-            }
-            if (exists $info->{targetsync}) {
-                print '  Used as target in syncs: ';
-                print join ', ' => sort keys %{ $info->{targetsync} };
-                print "\n";
+            ## Which syncs are using it, and as what role
+            if (exists $info->{sync}) {
+                for my $syncname (sort keys %{ $info->{sync} }) {
+                    print "  Used in sync $syncname in a role of $info->{sync}{$syncname}{role}\n";
+                }
             }
 
             $VERBOSE >= 2 and show_all_columns($info);