Rev 4586: (mbp) updates to progress-related docstrings and remove another in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Aug 4 14:42:45 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4586 [merge]
revision-id: pqm at pqm.ubuntu.com-20090804134242-l38wkokrlhd8ci6l
parent: pqm at pqm.ubuntu.com-20090804123507-6hzrl27orc90ernc
parent: mbp at sourcefrog.net-20090804114059-xptutagbs5jev3ry
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-08-04 14:42:42 +0100
message:
(mbp) updates to progress-related docstrings and remove another
obsolete method
modified:
bzrlib/progress.py progress.py-20050610070202-df9faaab791964c0
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/store/__init__.py store.py-20050309040759-164dc5173d6406c2
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/per_workingtree/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/ui/text.py text.py-20051130153916-2e438cffc8afc478
=== modified file 'bzrlib/progress.py'
--- a/bzrlib/progress.py 2009-08-03 05:31:01 +0000
+++ b/bzrlib/progress.py 2009-08-04 11:40:59 +0000
@@ -174,7 +174,10 @@
@deprecated_function(deprecated_in((1, 16, 0)))
def ProgressBar(to_file=None, **kwargs):
- """Abstract factory"""
+ """Construct a progress bar.
+
+ Deprecated; ask the ui_factory for a progress task instead.
+ """
if to_file is None:
to_file = sys.stderr
requested_bar_type = os.environ.get('BZR_PROGRESS_BAR')
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2009-07-20 10:14:42 +0000
+++ b/bzrlib/repository.py 2009-08-04 11:40:59 +0000
@@ -3693,7 +3693,7 @@
:param revision_ids: The list of revisions to fetch. Must be in
topological order.
- :param pb: A ProgressBar
+ :param pb: A ProgressTask
:return: None
"""
basis_id, basis_tree = self._get_basis(revision_ids[0])
=== modified file 'bzrlib/store/__init__.py'
--- a/bzrlib/store/__init__.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/store/__init__.py 2009-06-23 06:58:46 +0000
@@ -102,7 +102,7 @@
:param other: Another Store object
:param ids: A list of entry ids to be copied
- :param pb: A ProgressBar object, if none is given, the default will be created.
+ :param pb: A ProgressTask object, if none is given, the default will be created.
:param permit_failure: Allow missing entries to be ignored
:return: (n_copied, [failed]) The number of entries copied successfully,
followed by a list of entries which could not be copied (because they
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-08-04 04:07:13 +0000
+++ b/bzrlib/tests/__init__.py 2009-08-04 11:40:59 +0000
@@ -753,12 +753,6 @@
stdin = StringIOWrapper(stdin)
super(TestUIFactory, self).__init__(stdin, stdout, stderr)
- def make_progress_view(self):
- return NullProgressView()
-
- def update(self, message, count=None, total=None):
- """See progress.ProgressBar.update()."""
-
def get_non_echoed_password(self):
"""Get password from stdin without trying to handle the echo mode"""
password = self.stdin.readline()
@@ -768,6 +762,9 @@
password = password[:-1]
return password
+ def make_progress_view(self):
+ return NullProgressView()
+
class TestCase(unittest.TestCase):
"""Base class for bzr unit tests.
=== modified file 'bzrlib/tests/per_workingtree/test_commit.py'
--- a/bzrlib/tests/per_workingtree/test_commit.py 2009-07-16 00:52:51 +0000
+++ b/bzrlib/tests/per_workingtree/test_commit.py 2009-08-04 11:40:59 +0000
@@ -49,17 +49,17 @@
self.depth = 0
def clear(self):
- """See progress.ProgressBar.clear()."""
+ """See progress.ProgressTask.clear()."""
def clear_term(self):
- """See progress.ProgressBar.clear_term()."""
+ """See progress.ProgressTask.clear_term()."""
def finished(self):
- """See progress.ProgressBar.finished()."""
+ """See progress.ProgressTask.finished()."""
self.depth -= 1
def note(self, fmt_string, *args, **kwargs):
- """See progress.ProgressBar.note()."""
+ """See progress.ProgressTask.note()."""
def progress_bar(self):
return self
@@ -69,7 +69,7 @@
return self
def update(self, message, count=None, total=None):
- """See progress.ProgressBar.update()."""
+ """See progress.ProgressTask.update()."""
if self.depth == 1:
self._calls.append(("update", count, total, message))
=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py 2009-07-22 00:34:44 +0000
+++ b/bzrlib/transform.py 2009-08-04 11:40:59 +0000
@@ -84,7 +84,7 @@
:param tree: The tree that will be transformed, but not necessarily
the output tree.
- :param pb: A ProgressBar indicating how much progress is being made
+ :param pb: A ProgressTask indicating how much progress is being made
:param case_sensitive: If True, the target of the transform is
case sensitive, not just case preserving.
"""
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py 2009-07-03 15:42:35 +0000
+++ b/bzrlib/transport/__init__.py 2009-08-04 11:40:59 +0000
@@ -846,7 +846,7 @@
"""Get a list of file-like objects, one for each entry in relpaths.
:param relpaths: A list of relative paths.
- :param pb: An optional ProgressBar for indicating percent done.
+ :param pb: An optional ProgressTask for indicating percent done.
:return: A list or generator of file-like objects
"""
# TODO: Consider having this actually buffer the requests,
@@ -1015,7 +1015,7 @@
the supplied location.
:param files: A set of (path, f) entries
- :param pb: An optional ProgressBar for indicating percent done.
+ :param pb: An optional ProgressTask for indicating percent done.
"""
return self._iterate_over(files, self.append_file, pb, 'append', expand=True)
=== modified file 'bzrlib/ui/text.py'
--- a/bzrlib/ui/text.py 2009-08-03 05:31:01 +0000
+++ b/bzrlib/ui/text.py 2009-08-04 11:40:59 +0000
@@ -49,9 +49,8 @@
stderr=None):
"""Create a TextUIFactory.
- :param bar_type: The type of progress bar to create. It defaults to
- letting the bzrlib.progress.ProgressBar factory auto
- select. Deprecated.
+ :param bar_type: The type of progress bar to create. Deprecated
+ and ignored; a TextProgressView is always used.
"""
super(TextUIFactory, self).__init__()
# TODO: there's no good reason not to pass all three streams, maybe we
More information about the bazaar-commits
mailing list