Rev 6493: (gz) Implement get_help_topic for ConfigOption. (Jelmer Vernooij) in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/2.5/

Patch Queue Manager pqm at pqm.ubuntu.com
Tue Mar 27 17:07:05 UTC 2012


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/2.5/

------------------------------------------------------------
revno: 6493 [merge]
revision-id: pqm at pqm.ubuntu.com-20120327170704-leuw7drzi7exeois
parent: pqm at pqm.ubuntu.com-20120315184057-1grgcn2ubniptfuv
parent: jelmer at samba.org-20120326170121-quxtne8bs1mihvxo
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.5
timestamp: Tue 2012-03-27 17:07:04 +0000
message:
  (gz) Implement get_help_topic for ConfigOption. (Jelmer Vernooij)
modified:
  bzrlib/config.py               config.py-20051011043216-070c74f4e9e338e8
  bzrlib/tests/test_config.py    testconfig.py-20051011041908-742d0c15d8d8c8eb
  doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2012-02-15 22:43:50 +0000
+++ b/bzrlib/config.py	2012-03-26 17:01:21 +0000
@@ -2442,6 +2442,9 @@
                 value = self.default
         return value
 
+    def get_help_topic(self):
+        return self.name
+
     def get_help_text(self, additional_see_also=None, plain=True):
         result = self.help
         from bzrlib import help_topics

=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py	2012-02-15 22:43:50 +0000
+++ b/bzrlib/tests/test_config.py	2012-03-26 17:01:21 +0000
@@ -2369,6 +2369,10 @@
         opt = config.Option('foo', default=bar_not_unicode)
         self.assertRaises(AssertionError, opt.get_default)
 
+    def test_get_help_topic(self):
+        opt = config.Option('foo')
+        self.assertEquals('foo', opt.get_help_topic())
+
 
 class TestOptionConverterMixin(object):
 

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2012-03-15 16:06:40 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2012-03-26 17:01:21 +0000
@@ -39,6 +39,9 @@
 * Fixed merge tool availability checking and invocation to search the
   Windows App Path registry in addition to the PATH. (Gordon Tyler, #939605)
 
+* Make sure configuration options can provide their own help topic.
+  (Jelmer Vernooij, #941672)
+
 Documentation
 *************
 




More information about the bazaar-commits mailing list