londiste subscriber tables: Show the statatus of the table.
authorMarko Kreen <markokr@gmail.com>
Tue, 31 Jul 2007 17:14:51 +0000 (17:14 +0000)
committerMarko Kreen <markokr@gmail.com>
Tue, 31 Jul 2007 17:14:51 +0000 (17:14 +0000)
Dimitri Fontaine & Marko Kreen

python/londiste/setup.py

index 678fe86c6dd75e472c03cd06b3d3cd08db03eb53..deda3117f5096cd135b2ae6477a3bcd1652e070e 100644 (file)
@@ -427,9 +427,18 @@ class SubscriberSetup(CommonSetup):
         src_db.commit()
 
     def subscriber_show_tables(self):
-        list = self.get_subscriber_table_list()
+        """print out subscriber table list, with state and snapshot"""
+        dst_db = self.get_database('subscriber_db')
+        dst_curs = dst_db.cursor()
+        list = self.fetch_subscriber_tables(dst_curs)
+        dst_db.commit()
+
+        format = "%-30s   %20s  %-20s"
+        print format % ("Table", "State", "Snapshot")
         for tbl in list:
-            print tbl
+            print format % (tbl['table_name'],
+                            tbl['merge_state'] or 'NEW',
+                            tbl['snapshot'] or '')
 
     def subscriber_missing_tables(self):
         provider_tables = self.get_provider_table_list()