changeset 21866:a2ca9dcb4b77

localrepo: document localrepo.hook()
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 12 Jul 2014 10:52:58 -0700
parents 78e56e70c70a
children e353fac7db26
files mercurial/localrepo.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun Jul 06 02:56:41 2014 +0900
+++ b/mercurial/localrepo.py	Sat Jul 12 10:52:58 2014 -0700
@@ -478,6 +478,12 @@
         return 'file:' + self.root
 
     def hook(self, name, throw=False, **args):
+        """Call a hook, passing this repo instance.
+
+        This a convenience method to aid invoking hooks. Extensions likely
+        won't call this unless they have registered a custom hook or are
+        replacing code that is expected to call a hook.
+        """
         return hook.hook(self.ui, self, name, throw, **args)
 
     @unfilteredmethod