~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Alexander Belchenko
  • Date: 2007-08-07 19:18:38 UTC
  • mto: This revision was merged to the branch mainline in revision 2685.
  • Revision ID: bialix@ukr.net-20070807191838-1jk304202cbcmu55
fixes after John's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
        :param plain: if False, raw help (reStructuredText) is
284
284
            returned instead of plain text.
285
285
        :param see_also_as_links: if True, convert items in 'See also'
286
 
            list to internal links (used by bzr_man generator)
 
286
            list to internal links (used by bzr_man rstx generator)
287
287
        """
288
288
        doc = self.help()
289
289
        if doc is None:
341
341
            result += ':From:     plugin "%s"\n' % plugin_name
342
342
        see_also = self.get_see_also(additional_see_also)
343
343
        if see_also:
344
 
            if see_also_as_links:
345
 
                see_also = [(item != "topics" and "`%s`_" or "%s") % item
346
 
                            for item in see_also]
 
344
            if not plain and see_also_as_links:
 
345
                see_also_links = []
 
346
                for item in see_also:
 
347
                    if item == 'topics':
 
348
                        # topics doesn't have an independent section
 
349
                        # so don't create a real link
 
350
                        see_also_links.append(item)
 
351
                    else:
 
352
                        # Use a reST link for this entry
 
353
                        see_also_links.append("`%s`_" % (item,))
 
354
                see_also = see_also_links
347
355
            result += ':See also: '
348
356
            result += ', '.join(see_also) + '\n'
349
357