Rev 5206: (lifeless) Docstring improvements for users of bzrlib. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed May 5 05:04:12 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5206 [merge]
revision-id: pqm at pqm.ubuntu.com-20100505040408-cnykrpfzu689ohgs
parent: pqm at pqm.ubuntu.com-20100504220205-wonry54yq4jeu1b2
parent: robertc at robertcollins.net-20100505023502-fzybvhmxe9sv3b3g
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2010-05-05 05:04:08 +0100
message:
  (lifeless) Docstring improvements for users of bzrlib. (Robert Collins)
modified:
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
  bzrlib/tests/treeshape.py      treeshape.py-20051004094628-312a98f0194306a8
  bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
=== 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 02:35:02 +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 = staticmethod(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]

=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2010-03-30 14:44:30 +0000
+++ b/bzrlib/trace.py	2010-05-05 02:35:02 +0000
@@ -111,6 +111,12 @@
 
 
 def note(*args, **kwargs):
+    """Output a note to the user.
+
+    Takes the same parameters as logging.info.
+
+    :return: None
+    """
     # FIXME note always emits utf-8, regardless of the terminal encoding
     #
     # FIXME: clearing the ui and then going through the abstract logging

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2010-04-16 07:56:51 +0000
+++ b/bzrlib/transport/__init__.py	2010-05-04 06:22:51 +0000
@@ -539,6 +539,9 @@
 
         This function will only be defined for Transports which have a
         physical local filesystem representation.
+
+        :raises errors.NotLocalUrl: When no local path representation is
+            available.
         """
         raise errors.NotLocalUrl(self.abspath(relpath))
 




More information about the bazaar-commits mailing list