# HG changeset patch # User Pierre-Yves David # Date 1464363233 -7200 # Node ID 7a2e0629bdee8cd842bb884094cef9683ed49520 # Parent aec233d3cafd08ad4143409eb2d39821d8b75f8c inhibit: protect agains dropped 'bmstore.write' As planned per the deprecation policy, 'bmstore.write' have been dropped in Mercurial core (052c9318e464). diff -r aec233d3cafd -r 7a2e0629bdee hgext/inhibit.py --- a/hgext/inhibit.py Wed May 25 19:41:08 2016 +0000 +++ b/hgext/inhibit.py Fri May 27 17:33:53 2016 +0200 @@ -296,7 +296,8 @@ # There are two ways to save bookmark changes during a transation, we # wrap both to add inhibition markers. extensions.wrapfunction(bookmarks.bmstore, 'recordchange', _bookmarkchanged) - extensions.wrapfunction(bookmarks.bmstore, 'write', _bookmarkchanged) + if getattr(bookmarks.bmstore, 'write', None) is not None:# mercurial < 3.9 + extensions.wrapfunction(bookmarks.bmstore, 'write', _bookmarkchanged) # Add bookmark -D option entry = extensions.wrapcommand(commands.table, 'bookmark', _bookmark) entry[1].append(('D','prune',None,