bookmark: deprecate direct update of a bookmark value
This changeset was part of an older series preventing direct update of the
bookmarks store without the change being tracked by a transaction. For some
unclear reason, this was not sent to the list. So we are sending it now.
Initial series: 3325c7dcabaa+08bf0ebc6c8e+712a85b3677f.
We want to channel all bookmarks update through 'applychanges' so let's remove
more way to work around this function.
--- a/mercurial/bookmarks.py Mon Oct 16 14:32:06 2017 +0200
+++ b/mercurial/bookmarks.py Fri Jul 14 19:59:10 2017 +0200
@@ -122,6 +122,12 @@
self._clean = False
return dict.__delitem__(self, key)
+ def update(self, *others):
+ msg = ("bookmarks.update(...)' is deprecated, "
+ "use 'bookmarks.applychanges'")
+ self._repo.ui.deprecwarn(msg, '4.5')
+ return dict.update(self, *others)
+
def applychanges(self, repo, tr, changes):
"""Apply a list of changes to bookmarks
"""