Rev 5434: (spiv) Improve help for 'bzr update', fix typo in help for 'bzr join', in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Sep 20 07:17:03 BST 2010


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

------------------------------------------------------------
revno: 5434 [merge]
revision-id: pqm at pqm.ubuntu.com-20100920061700-h551kh0idtts2ild
parent: pqm at pqm.ubuntu.com-20100920015528-uq5ugmc4rdt5dsdp
parent: andrew.bennetts at canonical.com-20100920045626-z1yf71vj0dl4h47s
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2010-09-20 07:17:00 +0100
message:
  (spiv) Improve help for 'bzr update', fix typo in help for 'bzr join',
   add docstrings in lsprof.py. (John C Barstow) (Andrew Bennetts)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/lsprof.py               lsprof.py-20051208071030-833790916798ceed
=== modified file 'NEWS'
--- a/NEWS	2010-09-20 01:55:28 +0000
+++ b/NEWS	2010-09-20 04:56:26 +0000
@@ -249,6 +249,9 @@
   the new http://bazaar.canonical.com or http://wiki.bazaar.canonical.com
   (John Arbash Meinel, #617503)
 
+* Suggest ``bzr revert`` for restoring locally deleted files in help text
+  for ``bzr update``.  (John C Barstow, #191466)
+
 API Changes
 ***********
 

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2010-09-15 10:40:51 +0000
+++ b/bzrlib/builtins.py	2010-09-20 04:56:26 +0000
@@ -1354,6 +1354,9 @@
     If you want to discard your local changes, you can just do a
     'bzr revert' instead of 'bzr commit' after the update.
 
+    If you want to restore a file that has been removed locally, use
+    'bzr revert' instead of 'bzr update'.
+
     If the tree's branch is bound to a master branch, it will also update
     the branch from the master.
     """
@@ -4942,7 +4945,7 @@
     not part of it.  (Such trees can be produced by "bzr split", but also by
     running "bzr branch" with the target inside a tree.)
 
-    The result is a combined tree, with the subtree no longer an independant
+    The result is a combined tree, with the subtree no longer an independent
     part.  This is marked as a merge of the subtree into the containing tree,
     and all history is preserved.
     """

=== modified file 'bzrlib/lsprof.py'
--- a/bzrlib/lsprof.py	2010-07-04 06:22:11 +0000
+++ b/bzrlib/lsprof.py	2010-09-19 09:07:42 +0000
@@ -112,14 +112,21 @@
 
 
 class Stats(object):
-    """XXX docstring"""
+    """Wrapper around the collected data.
+
+    A Stats instance is created when the profiler finishes. Normal
+    usage is to use save() to write out the data to a file, or pprint()
+    to write human-readable information to the command line.
+    """
 
     def __init__(self, data, threads):
         self.data = data
         self.threads = threads
 
     def sort(self, crit="inlinetime"):
-        """XXX docstring"""
+        """Sort the data by the supplied critera.
+
+        :param crit: the data attribute used as the sort key."""
         if crit not in profiler_entry.__dict__:
             raise ValueError, "Can't sort by %s" % crit
         self.data.sort(lambda b, a: cmp(getattr(a, crit),
@@ -130,7 +137,12 @@
                                               getattr(b, crit)))
 
     def pprint(self, top=None, file=None):
-        """XXX docstring"""
+        """Pretty-print the data as plain text for human consumption.
+
+        :param top: only output the top n entries.
+            The default value of None means output all data.
+        :param file: the output file; if None, output will
+            default to stdout."""
         if file is None:
             file = sys.stdout
         d = self.data




More information about the bazaar-commits mailing list