~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hooks.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-11 23:33:07 UTC
  • mfrom: (4108.3.1 Hooks.docs)
  • Revision ID: pqm@pqm.ubuntu.com-20090311233307-n6zmhg1y074svja6
(robertc) Trivially add the class name as a header before the
        HookPoint docs in Hooks.docs(). (Tobert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        """
58
58
        hook_names = sorted(self.keys())
59
59
        hook_docs = []
 
60
        name = self.__class__.__name__
 
61
        hook_docs.append(name)
 
62
        hook_docs.append("="*len(name))
 
63
        hook_docs.append("")
60
64
        for hook_name in hook_names:
61
65
            hook = self[hook_name]
62
66
            try:
68
72
                strings.append("-" * len(hook_name))
69
73
                strings.append("")
70
74
                strings.append("An old-style hook. For documentation see the __init__ "
71
 
                    "method of '%s'\n" % (self.__class__.__name__,))
 
75
                    "method of '%s'\n" % (name,))
72
76
                hook_docs.extend(strings)
73
77
        return "\n".join(hook_docs)
74
78