[PATCH 3 of 4 V2] bookmark: deprecate 'bmstore.write' method
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Dec 7 13:33:51 CST 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1449387247 28800
# Sat Dec 05 23:34:07 2015 -0800
# Node ID 4469287024fbad9588cb3a75daa1aa76d80d4a76
# Parent abc6aeab55afb3158a6b34b9ba1f8917835a3843
# EXP-Topic deprecationwarning
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
# hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 4469287024fb
bookmark: deprecate 'bmstore.write' method
This function does not collaborate with the transaction and must disappear. As
we have likely a lot of third party users, we make it deprecated to let them some
time to upgrade their code.
Thanks goes to Laurent Charignon for cleanup the last remains of the 'write'
method.
diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -103,10 +103,12 @@ class bmstore(dict):
in a format equal to those of localtags.
We also store a backup of the previous state in undo.bookmarks that
can be copied back on rollback.
'''
+ msg = 'bm.write() is deprecated, use bm.recordchange(transaction)'
+ self._repo.ui.deprecwarn(msg, '3.7')
if self._clean:
return
repo = self._repo
if (repo.ui.configbool('devel', 'all-warnings')
or repo.ui.configbool('devel', 'check-locks')):
More information about the Mercurial-devel
mailing list