[MERGE][Bug #124853] bzr help debug should list debug options

Daniel Watkins D.M.Watkins at warwick.ac.uk
Wed Aug 22 21:00:03 BST 2007


On Wed, 2007-08-22 at 20:45 +0100, James Westby wrote:
> Two questions, first why does "hooks" have no comment? Second there is
> no test for this. It's not to important, but a blackbox smoke test would
> be good, you can see the tests for some of the other topics.
Hooks has no comment because there is no comment in bzrlib/debug.py.  If
someone would be kind enough to give me a comment for hooks, I'll pop it
in.

Attached is a bundle with a test added.


Regards,
-- 
Daniel Watkins (Odd_Bloke) <D.M.Watkins at warwick.ac.uk>
University of Warwick Christian Focus President
University of Warwick Computing Society WUGLUG Liaison Officer
-------------- next part --------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: d.m.watkins at warwick.ac.uk-20070822195912-\
#   kx3opmuscu7ybxef
# target_branch: file:///home/daniel/devel/bzr/bzr.dev/
# testament_sha1: da3a30a76779fb1fd80e5159867773b9d56d7a12
# timestamp: 2007-08-22 21:59:24 +0200
# base_revision_id: pqm at pqm.ubuntu.com-20070822052832-nxby1d1plok4syek
# 
# Begin patch
=== modified file 'NEWS'
--- NEWS	2007-08-22 05:28:32 +0000
+++ NEWS	2007-08-22 19:29:46 +0000
@@ -44,6 +44,9 @@
     * ``send`` now sends the directive as an attachment by default.
       (Aaron Bentley, Luk?? Lalinsk?, Alexander Belchenko)
 
+    * ``bzr help debug-flags`` now contains information on how to use debug
+      flags and an incomplete list of them.  (Daniel Watkins, #124853)
+
   API BREAKS:
 
    * ``Branch.append_revision`` is removed altogether; please use 

=== modified file 'bzrlib/help_topics.py'
--- bzrlib/help_topics.py	2007-08-07 01:58:45 +0000
+++ bzrlib/help_topics.py	2007-08-22 19:27:48 +0000
@@ -498,6 +498,23 @@
 """
 
 
+_debug_flags = \
+"""Debug Flags
+
+Set of flags that enable different debug behaviour.  These are set with eg
+``-Dlock`` on the bzr command line.
+
+Options include:
+ * evil - capture call sites that do expensive or badly-scaling operations.
+ * error - show stack traces for all top level exceptions
+ * hooks 
+ * hpss - trace smart protocol requests and responses
+ * index - trace major index operations
+ * lock - trace when lockdir locks are taken or released
+
+"""
+
+
 topic_registry.register("revisionspec", _help_on_revisionspec,
                         "Explain how to use --revision")
 topic_registry.register('basic', _basic_help, "Basic commands", SECT_HIDDEN)
@@ -527,6 +544,8 @@
                         'Environment variable names and values')
 topic_registry.register('files', _files,
                         'Information on configuration and log files')
+topic_registry.register('debug-flags', _debug_flags,
+                        'Information on debug flags')
 
 
 class HelpTopicIndex(object):

=== modified file 'bzrlib/tests/blackbox/test_help.py'
--- bzrlib/tests/blackbox/test_help.py	2007-08-06 08:25:46 +0000
+++ bzrlib/tests/blackbox/test_help.py	2007-08-22 19:59:12 +0000
@@ -91,6 +91,13 @@
         expected = help_as_plain_text(_status_flags)
         self.assertEqual(expected, out)
 
+    def test_help_debug_flags(self):
+        """Smoke test for 'bzr help debug-flags'"""
+        out, err = self.run_bzr('help debug-flags')
+        from bzrlib.help_topics import help_as_plain_text, _debug_flags
+        expected = help_as_plain_text(_debug_flags)
+        self.assertEqual(expected, out)
+
     def test_help_commands(self):
         dash_help  = self.run_bzr('--help commands')[0]
         commands   = self.run_bzr('help commands')[0]

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWeKMhM8ABO1/gFQQBABZ9///
dyOMhP////BgCU+eTStAAAX1gTqxk6MgtmhDKCFPZUeUep6nlPEwnpRmptQNGgNDQADmBMTQYTJk
yZGEwTTTIxMAQwHMCYmgwmTJkyMJgmmmRiYAhgEiQSI9Am0aUxNqYQ0wTI0aNGjQ9QaDalPREQek
9T0hpo9RkAaHqGhoyAYTQEkgTEAITIZEyZogam0nqR6jTIDCPLQSgvtHXVPTv+611ZSGQpTs196I
AkV1qhZZF4OjjkRXI9HYxp9o7EGQmQQTK7uaGd2MlYSxcJFne2nfWKdrCt02JuNmaDNkgqgyNcIr
/ZKlgv0h+8v13i/NapkNtpv8eItk1aF0blCctGqcr2TY2RStNKosfoz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ltojWUJcNc4LM6FmKIGJsWOSQ
pLA0Vq9K3exVAlhF+eUdxKROORQw4IsJ4qZE+wVjEvr79nGdr3i0E7gAmg9XoH26MK1iwYIMnTEM
53eEaMVNknDnd+LM48EGi8FMVkwoUFEGKFhJq4llVTJYcW+4zjFiVIRaamKBY1c2wAcQbjMLxFyC
AZueMKjIKpgrUgLAMRc+oPPJ/aIOP9ZJC7FWIbMmu5i1HmnDVA2jALgRRzSFgAp3pCa080GBQmZi
uB8BX9zxLiWqq3i3PCYd4vUZSXMivyF0Bkg3Yhgs0FqXcg/4u5IpwoSHFGQmeA==
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070822/f6f741b3/attachment.pgp 


More information about the bazaar mailing list