Patchwork [1,of,6] bookmarks: document getbkfile method

login
register
mail settings
Submitter Augie Fackler
Date Dec. 2, 2015, 4:19 p.m.
Message ID <a3c94c05b06a6288079d.1449073147@imladris.local>
Download mbox | patch
Permalink /patch/11748/
State Superseded
Headers show

Comments

Augie Fackler - Dec. 2, 2015, 4:19 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1447292605 18000
#      Wed Nov 11 20:43:25 2015 -0500
# Node ID a3c94c05b06a6288079dbeb99719774b9ac6e47b
# Parent  0945539a3a6b1685915313f96f114918bf13fb52
bookmarks: document getbkfile method

I'm working on bmstore again, and this function gave me a moment's
pause. Document it to save future readers from any undue confusion.

Patch

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -61,6 +61,12 @@  class bmstore(dict):
                 raise
 
     def getbkfile(self, repo):
+        """Hook so that extensions that mess with the store can hook bm storage.
+
+        For core, this just handles wether we should see pending
+        bookmarks or the committed ones. Other extensions (like share)
+        may need to tweak this behavior further.
+        """
         bkfile = None
         if 'HG_PENDING' in os.environ:
             try: