Rev 8: Update for bzr_transport declaration. in http://people.canonical.com/~robertc/baz2.0/plugins/plugin_info/trunk

Robert Collins robertc at robertcollins.net
Wed Aug 5 05:45:27 BST 2009


At http://people.canonical.com/~robertc/baz2.0/plugins/plugin_info/trunk

------------------------------------------------------------
revno: 8
revision-id: robertc at robertcollins.net-20090805044521-fg574jy5pjmcbzqv
parent: robertc at robertcollins.net-20080229190041-8v9umdqr7iu85jfd
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2009-08-05 14:45:21 +1000
message:
  Update for bzr_transport declaration.
=== modified file 'NEWS'
--- a/NEWS	2008-02-29 19:00:41 +0000
+++ b/NEWS	2009-08-05 04:45:21 +0000
@@ -18,6 +18,8 @@
 
   IMPROVEMENTS:
 
+    * Updated for bzr 1.18+'s new bzr_transport's attribute. (Robert Collins)
+
   BUGFIXES:
 
   API BREAKS:

=== modified file 'extract.py'
--- a/extract.py	2008-02-29 17:54:31 +0000
+++ b/extract.py	2009-08-05 04:45:21 +0000
@@ -63,6 +63,7 @@
     result.checkout_formats = eval_globals.get('bzr_checkout_formats', {})
     result.branch_formats = eval_globals.get('bzr_branch_formats', {})
     result.repository_formats = eval_globals.get('bzr_repository_formats', {})
+    result.transports = eval_globals.get('bzr_transports', [])
     result.location = path
     return result
 
@@ -82,6 +83,7 @@
         self.checkout_formats = {}
         self.branch_formats = {}
         self.repository_formats = {}
+        self.transports = []
 
     def __eq__(self, other):
         return self.__dict__ == other.__dict__
@@ -93,7 +95,9 @@
         checkout_string = ','.join('"%s"'% format for format in self.checkout_formats.values())
         branch_string = ','.join('"%s"'% format for format in self.branch_formats.values())
         repository_string = ','.join('"%s"'% format for format in self.repository_formats.values())
+        transports_string = ','.join('"%s"' % prefix for prefix in self.transports)
         return ('%s(%s) from %s supplies commands(%s), control formats(%s), '
-            'checkout formats(%s), branch formats(%s), repository formats(%s).'
+            'checkout formats(%s), branch formats(%s), repository formats(%s), '
+            'transports(%s).'
             % (self.name, version_string, self.location, command_string, control_string,
-               checkout_string, branch_string, repository_string))
+               checkout_string, branch_string, repository_string, transports_string))

=== modified file 'tests/test_blackbox.py'
--- a/tests/test_blackbox.py	2008-02-29 19:00:41 +0000
+++ b/tests/test_blackbox.py	2009-08-05 04:45:21 +0000
@@ -33,6 +33,7 @@
 bzr_checkout_formats = {"Bazaar Working Tree Format 4 (bzr 0.15)\\n":"dirstate"}
 bzr_branch_formats = {"Bazaar Branch Format 6 (bzr 0.15)\\n":"branch 6"}
 bzr_repository_formats = {"Bazaar pack repository format 1 (needs bzr 0.92)\\n":"packs"}
+bzr_transports = ["hg+ssh://"]
 """
 
     def test_extract_info_branch(self):
@@ -44,7 +45,7 @@
         self.build_tree_contents([('plugin2/setup.py', self.sample_setup())])
         out, err = self.run_bzr(['plugin-info', 'plugin', 'plugin2'])
         self.assertEqual(
-"""foo_bar(1.2.3dev0) from plugin supplies commands("a-command"), control formats("bzr-meta"), checkout formats("dirstate"), branch formats("branch 6"), repository formats("packs").
-foo_bar(1.2.3dev0) from plugin2 supplies commands("a-command"), control formats("bzr-meta"), checkout formats("dirstate"), branch formats("branch 6"), repository formats("packs").
+"""foo_bar(1.2.3dev0) from plugin supplies commands("a-command"), control formats("bzr-meta"), checkout formats("dirstate"), branch formats("branch 6"), repository formats("packs"), transports("hg+ssh://").
+foo_bar(1.2.3dev0) from plugin2 supplies commands("a-command"), control formats("bzr-meta"), checkout formats("dirstate"), branch formats("branch 6"), repository formats("packs"), transports("hg+ssh://").
 """, out)
         self.assertEqual('', err)

=== modified file 'tests/test_extract.py'
--- a/tests/test_extract.py	2008-02-29 17:54:31 +0000
+++ b/tests/test_extract.py	2009-08-05 04:45:21 +0000
@@ -52,8 +52,9 @@
         plugin.checkout_formats = {"signature":"dirstate"}
         plugin.branch_formats = {"signature":"format 6"}
         plugin.repository_formats = {"signature":"packs"}
+        plugin.transports = ["hg+ssh://"]
         plugin.location = "http://bazaar-vcs.org/plugin-info/"
-        self.assertEqual('plugin_info(1.2.0dev0) from http://bazaar-vcs.org/plugin-info/ supplies commands("foo"), control formats("svn"), checkout formats("dirstate"), branch formats("format 6"), repository formats("packs").',
+        self.assertEqual('plugin_info(1.2.0dev0) from http://bazaar-vcs.org/plugin-info/ supplies commands("foo"), control formats("svn"), checkout formats("dirstate"), branch formats("format 6"), repository formats("packs"), transports("hg+ssh://").',
             str(plugin))
 
     def test___eq__(self):
@@ -131,6 +132,7 @@
 bzr_checkout_formats = {"Bazaar Working Tree Format 4 (bzr 0.15)\\n":"dirstate"}
 bzr_branch_formats = {"Bazaar Branch Format 6 (bzr 0.15)\\n":"branch 6"}
 bzr_repository_formats = {"Bazaar pack repository format 1 (needs bzr 0.92)\\n":"packs"}
+bzr_transports = ["hg+ssh://"]
 """
 
     def expected_plugin(self):
@@ -149,6 +151,7 @@
             "Bazaar Branch Format 6 (bzr 0.15)\n":"branch 6"}
         expected_plugin.repository_formats = {
             "Bazaar pack repository format 1 (needs bzr 0.92)\n":"packs"}
+        expected_plugin.transports = ["hg+ssh://"]
         return expected_plugin
 
     def test_extract_all_variables(self):




More information about the bazaar-commits mailing list