~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hooks.py

  • Committer: Martin Pool
  • Date: 2009-03-12 05:44:43 UTC
  • mfrom: (4124 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4144.
  • Revision ID: mbp@sourcefrog.net-20090312054443-rz5kodxh1cjjx2id
merge trunk

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