Rev 5203: Make 'pydoc bzrlib.tests.build_tree_shape' useful. in http://bazaar.launchpad.net/~lifeless/bzr/stuff

Robert Collins robertc at robertcollins.net
Wed May 5 01:05:30 BST 2010


At http://bazaar.launchpad.net/~lifeless/bzr/stuff

------------------------------------------------------------
revno: 5203
revision-id: robertc at robertcollins.net-20100505000529-ltmllyms5watqj5u
parent: robertc at robertcollins.net-20100504064659-d5ybq23qlzov7w90
committer: Robert Collins <robertc at robertcollins.net>
branch nick: stuff
timestamp: Wed 2010-05-05 12:05:29 +1200
message:
  Make 'pydoc bzrlib.tests.build_tree_shape' useful.
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2010-04-23 16:22:41 +0000
+++ b/bzrlib/tests/__init__.py	2010-05-05 00:05:29 +0000
@@ -112,13 +112,13 @@
 from bzrlib.tests import (
     test_server,
     TestUtil,
+    treeshape,
     )
 from bzrlib.tests.http_server import HttpServer
 from bzrlib.tests.TestUtil import (
                           TestSuite,
                           TestLoader,
                           )
-from bzrlib.tests.treeshape import build_tree_contents
 from bzrlib.ui import NullProgressView
 from bzrlib.ui.text import TextUIFactory
 import bzrlib.version_info_formats.format_custom
@@ -2578,8 +2578,7 @@
                 content = "contents of %s%s" % (name.encode('utf-8'), end)
                 transport.put_bytes_non_atomic(urlutils.escape(name), content)
 
-    def build_tree_contents(self, shape):
-        build_tree_contents(shape)
+    build_tree_contents = treeshape.build_tree_contents
 
     def assertInWorkingTree(self, path, root_path='.', tree=None):
         """Assert whether path or paths are in the WorkingTree"""

=== modified file 'bzrlib/tests/treeshape.py'
--- a/bzrlib/tests/treeshape.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/treeshape.py	2010-05-05 00:05:29 +0000
@@ -41,6 +41,10 @@
 
     The template is built relative to the Python process's current
     working directory.
+
+    ('foo/',) will build a directory.
+    ('foo', 'bar') will write 'bar' to 'foo'
+    ('foo@', 'linktarget') will raise an error
     """
     for tt in template:
         name = tt[0]




More information about the bazaar-commits mailing list