Comments
Patch
@@ -40,6 +40,7 @@ from mercurial import (
mdiff,
merge,
node as nodemod,
+ obsolete,
patch,
phases,
repair,
@@ -70,6 +71,18 @@ patchextension = 'patch'
# generic user for all shelve operations
shelveuser = 'shelve@localhost'
+def isobsshelve(repo, ui):
+ """Check whether obsolescense-based shelve is enabled"""
+ obsshelve = ui.configbool('experimental', 'obsshelve')
+ if not obsshelve:
+ return False
+ if not obsolete.isenabled(repo, obsolete.createmarkersopt):
+ w = _('ignoring experimental.obsshelve because createmarkers option '
+ 'is disabled')
+ ui.warn(w)
+ return False
+ return True
+
class obsshelvefile(scmutil.simplekeyvaluefile):
KEYS = [('node', True)]